public void setup(int i, TestKnifeShop shop) { shopRef = shop; index = i; knifeRef = shop.shopKnifeList [index]; knifeImage.sprite = knifeRef.GetComponent <SpriteRenderer> ().sprite; UpdateUIColor(); }
void Start() { if (intance == null) { intance = this; //edited SetupShop() to AetupAppleShop() and addes 2 lines //SetupAppleShop(); //SetupWatchShop(); //SetupBuyShop(); SetupShop(); } }