Exemplo n.º 1
0
 void Awake()
 {
     //GameTool.DeleteAll();//测试用
     if (!GameTool.HasKey("CurrentLevel"))
     {
         GameTool.SetInt("CurrentLevel", 1);
         currentMaxLevel = 1;
     }
     else
     {
         currentMaxLevel = GameTool.GetInt("CurrentLevel");
     }
 }
Exemplo n.º 2
0
 public void InitData()
 {
     if (!GameTool.HasKey("CoinCount"))
     {
         GameTool.SetInt("CoinCount", 100);
     }
     coinCount = GameTool.GetInt("CoinCount");
     if (!GameTool.HasKey("RedCount"))
     {
         GameTool.SetInt("RedCount", 20);
     }
     redCount = GameTool.GetInt("RedCount");
 }
Exemplo n.º 3
0
 //对外提供的,修改红药水的方法
 public void EditorRedCount(int newRedCount)
 {
     redCount = newRedCount;
     GameTool.SetInt("RedCount", newRedCount);
 }
Exemplo n.º 4
0
 //对外提供的,修改金币数量的方法
 public void EditorCoinCount(int newCoinCount)
 {
     coinCount = newCoinCount;
     GameTool.SetInt("CoinCount", newCoinCount);
 }
Exemplo n.º 5
0
 public void SetCurrentMaxLevel(int currentLevel)
 {
     this.currentMaxLevel = currentLevel;
     GameTool.SetInt("CurrentLevel", currentLevel);
 }