chicken_dy/Assets/Scripts/Storage/PlayerData.cs

28 lines
577 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerData : StorageBase<PlayerData>
{
public int CurrentLevel
{
get
{
return mCurrentLevel;
}
set
{
mCurrentLevel = Mathf.Clamp(value, 1, GameConfig.Instance.LevelSort.Count);
Save();
}
}
[SerializeField]private int mCurrentLevel = 1;
public int CurrentLevelID
{
get
{
return GameConfig.Instance.LevelSort[mCurrentLevel - 1];
}
}
}