Esempio n. 1
0
    void Update()
    {
        if (update)
        {
            update = false;

            itemImage  = Resources.Load <Sprite>(productID);
            img.sprite = itemImage;

            string name = callbacksHandler.getProductName(productID);
            nameText.text  = name;
            priceText.text = callbacksHandler.getProductPrice(productID);
            descText.text  = callbacksHandler.getProductDescription(productID);
        }
    }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     callbacksHandler = GameObject.Find("HMSManager").GetComponent <HMSCallbacksHandler>();
     itemName         = GetComponent <Text>();
     itemName.text    = callbacksHandler.getProductName("coins100");
 }