void BuyFunction() { int price = obtainable.Price; if (GameManager.Instance.Gold < price) { AnimationManager.MakeFadeTextClips(unit, "Not Enough Money", Color.red); } else { GameManager.Instance.Gold -= price; base.OnTile(unit); Debug.Log("Gold: " + GameManager.Instance.Gold); Debug.Log("Price: " + price); Debug.Log("Buy"); Confirm.Disable(); } }
void CancelFunction() { Confirm.Disable(); }