public void makeCard(GameObject prefab) { card = prefab; if (isFaceUp) { card.GetComponent <Sprites>().sprite = frontImage; } else { card.GetComponent <Sprites>().sprite = backImage; } }
public void ClickTheBotton() { if (GlobleCookie.CookieCount == 0) { StatusBox.Getcomponent <text>().text = "Not Enough Cookie to Sell."; StatusBox.GetComponent <animation>().Play("StatusAnimation"); } else { GlobleCockie.CookieCount -= 1; GlobleCash.CashCount += 1; } }
public void clicked(Gameobject buttonObj) { Debug.Log("Button Buy Clicked!"); Text text = buttonObj.GetComponentInChildren <Text>(true); if (text != null) { textRef.text = "i am a button!"; ´ } Image image = buttonObj.GetComponent <Image>(); if (image != null) { image.color = newColor; } }
public void setBack(GameObject prefab, Sprite CardFace) { card = prefab; card.GetComponent <Sprites>().sprite = CardFace; }