Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
 void CancelFunction()
 {
     Confirm.Disable();
 }