// Start is called before the first frame update public void OnPotionButton() { if (AddMoney.currentGold >= 10) { playerUnit.PotionBuy(1); AddMoney.gainMoney(-10); shopText.text = "Pleasure doing business!"; } else { shopText.text = "You don't have enough gold, sorry!"; return; } }
void EndBattle() { if (state == BattleState.WON) { dialogueText.text = "You won the battle! You gained " + enemyUnit.Gold + " Gold!"; AddMoney.gainMoney(enemyUnit.Gold); StartCoroutine(Transition()); } else if (state == BattleState.LOST) { StartCoroutine(DeathTransition()); } }