public void UpArrowDamage() { if (coin >= upCostArrowDamage) { lm.SetCoin(lm.GetCoin() - upCostArrowDamage); coin = lm.GetCoin(); coinText.text = coin.ToString(); lm.SetDamage(lm.GetDamage() + 2); arrowDamageText.text = lm.GetDamage().ToString(); } }
// 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(); }