// Use this for initialization void Start() { StoreCountText.text = Store.StoreCount.ToString(); BuyButtonText.text = "Buy " + Store.GetNextStoreCost().ToString("C2"); ProfitPerStoreText.text = "+" + Store.GetCurrentProfit().ToString("C2"); // CurrentStoreTimer.text = Store.GetCurrenStoreMinutes().ToString("00") + ":" + Store.GetCurrenStoreSeconds().ToString("00"); }
public void UpdateUI() { CanvasGroup cg = transform.GetComponent <CanvasGroup>(); if (!Store.StoreUnlocked && !gamemanager.instance.CanBuy(Store.GetNextStoreCost())) { cg.interactable = false; cg.alpha = 0; } else { cg.interactable = true; cg.alpha = 1; Store.StoreUnlocked = true; } if (gamemanager.instance.CanBuy(Store.GetNextStoreCost())) { BuyButton.interactable = true; } else { BuyButton.interactable = false; } BuyButtonText.text = "Buy " + Store.GetNextStoreCost().ToString("C2"); if (!Store.ManagerUnlocked && gamemanager.instance.CanBuy(Store.ManagerCost)) { ManagerButton.interactable = true; } else { ManagerButton.interactable = false; } }
void UpdateBuyButtonText() { BuyButtonText.text = "Buy $" + Store.GetNextStoreCost().ToString("n2"); }
// Start is called before the first frame update void Start() { StoreCountText.text = Store.StoreCount.ToString(); BuyButtonText.text = "Buy " + Store.GetNextStoreCost().ToString("C2"); }