public BuyableInfo(BuyableInfo template) { price = template.price; maintenance = template.maintenance; recupOnDisband = template.recupOnDisband; revenue = template.revenue; type = template.type; thumbnail = template.thumbnail; }
public void OnBuy(BuyableInfo info, out bool success) { PopupHandler popupHandler = FindObjectOfType <PopupHandler>(); if (currentPlayer.CurrentGold() < info.price) { popupHandler.OnInfoPupup(new InfoPopupInfo() { infoText = "You don't have enough money", okText = "Ok" }); success = false; return; } success = true; RemoveGold(info.price); StartCoroutine(RefreshDelay()); }
public void RemoveBuyable(BuyableInfo info) { assets.Remove(info); Economy.Instance.Refresh(); }
public void AddBuyableNoRefresh(BuyableInfo info) { assets.Add(info); }
public void AddBuyable(BuyableInfo info) { assets.Add(info); Economy.Instance.Refresh(); }