public void UpMaxArrow() { if (coin >= upCostMaxArrow) { lm.SetCoin(lm.GetCoin() - upCostMaxArrow); coin = lm.GetCoin(); coinText.text = coin.ToString(); lm.SetMaxArrow(lm.GetMaxArrow() + 1); maxArrowText.text = lm.GetMaxArrow().ToString(); } }
public void ClaimReward() { CombatAgent.Instance.OnBattleDone(); LegacyManager lm = new LegacyManager(); lm.SetCoin(lm.GetCoin() + reward); GetComponent <SceneLoader>().RemoveScene("Combat Chapter 1"); }
// Start is called before the first frame update void Start() { lm = new LegacyManager(); maxArrow = lm.GetMaxArrow(); arrowDamage = lm.GetDamage(); attackSpeed = lm.GetAttackSpeed(); maxHealth = lm.GetMaxHealth(); potion = lm.GetPotion(); coin = lm.GetCoin(); maxArrowText.text = maxArrow.ToString(); arrowDamageText.text = arrowDamage.ToString(); attackSpeedText.text = attackSpeed.ToString(); maxHealthText.text = maxHealth.ToString(); potionText.text = potion.ToString(); coinText.text = coin.ToString(); }