コード例 #1
0
 public void buyHealth()
 {
     if (Player_Info.Money >= ShopInfo.HealthPrice)
     {
         Player_Info.BuyHealth();
         print(Player_Info.startingHealth);
         Player_Info.reduceMoney(ShopInfo.HealthPrice);
         ShopInfo.incrementHealth();
         updateHealthPrice();
         updatePlayerMoney();
         playCoinAudio();
         save();
     }
     else
     {
         errorHealthPrice();
         Invoke("updateHealthPrice", 3f);
     }
 }