diff --git a/Client/Assets/1_Script/Info/BuildingCtrl.cs b/Client/Assets/1_Script/Info/BuildingCtrl.cs index 3a882431..68b08ab3 100644 --- a/Client/Assets/1_Script/Info/BuildingCtrl.cs +++ b/Client/Assets/1_Script/Info/BuildingCtrl.cs @@ -85,6 +85,13 @@ public class BuildingCtrl : MonoBehaviour Debug.Log("»ý»ê°Ç¹°Àº ÆÄ±«ÇÒ ¼ö ¾ø½À´Ï´Ù."); return; } + int sell = 0; + for(int n = 0; n < buildingLevel; n++) + { + sell += unitInfo.unit.buy[n]; + } + sell /= 3; + PlayCtrl.Instance.TextUpdate(sell); unitInfo = null; img.sprite = null; img.color = Color.clear; diff --git a/Client/Assets/1_Script/PlayCtrl.cs b/Client/Assets/1_Script/PlayCtrl.cs index 0b67fc62..455463a5 100644 --- a/Client/Assets/1_Script/PlayCtrl.cs +++ b/Client/Assets/1_Script/PlayCtrl.cs @@ -121,8 +121,10 @@ public class PlayCtrl : SingletonMonoBehaviour if (money != int.Parse(moneyText.text)) Debug.LogError("¹ö±×¹ß°ß"); money += addMoney; - if(money < 0 || money > 999900) - Debug.LogError("°¡°Ý¹ö±×¹ß°ß"); + if(money < 0) + money = 0; + else if(money > 999999) + money = 999999; moneyText.text = money.ToString(); } }