public void Awake() { instance = this; thisObj = gameObject; canvasGroup = thisObj.GetComponent <CanvasGroup>(); if (canvasGroup == null) { canvasGroup = thisObj.AddComponent <CanvasGroup>(); } thisObj.GetComponent <RectTransform>().anchoredPosition = new Vector3(0, 0, 0); }
public void OnPurchaseButton() { string text = playerPerk.PurchasePerk(perkItemList[selectID].perkID); if (text != "") { UIMessage.Display(text); return; } UpdatePerkItemList(); UpdateDisplay(); }
public void _OnGameMessage(string msg) { UIMessage.Display(msg); }