판매 반환 시스템 작업
This commit is contained in:
parent
0f3d7535cb
commit
db0d9b651a
|
|
@ -85,6 +85,13 @@ public class BuildingCtrl : MonoBehaviour
|
||||||
Debug.Log("생산건물은 파괴할 수 없습니다.");
|
Debug.Log("생산건물은 파괴할 수 없습니다.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
int sell = 0;
|
||||||
|
for(int n = 0; n < buildingLevel; n++)
|
||||||
|
{
|
||||||
|
sell += unitInfo.unit.buy[n];
|
||||||
|
}
|
||||||
|
sell /= 3;
|
||||||
|
PlayCtrl.Instance.TextUpdate(sell);
|
||||||
unitInfo = null;
|
unitInfo = null;
|
||||||
img.sprite = null;
|
img.sprite = null;
|
||||||
img.color = Color.clear;
|
img.color = Color.clear;
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,10 @@ public class PlayCtrl : SingletonMonoBehaviour<PlayCtrl>
|
||||||
if (money != int.Parse(moneyText.text))
|
if (money != int.Parse(moneyText.text))
|
||||||
Debug.LogError("버그발견");
|
Debug.LogError("버그발견");
|
||||||
money += addMoney;
|
money += addMoney;
|
||||||
if(money < 0 || money > 999900)
|
if(money < 0)
|
||||||
Debug.LogError("가격버그발견");
|
money = 0;
|
||||||
|
else if(money > 999999)
|
||||||
|
money = 999999;
|
||||||
moneyText.text = money.ToString();
|
moneyText.text = money.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue