void populateList(GameObject newitem, PersistentData.itemInfo obj) { // Debug.Log (newitem); // // Debug.Log (newitem.transform.Find ("Name").GetComponent<Text>().text); // newitem.transform.Find("Name").GetComponent <Text> ().text = obj.Name; newitem.transform.Find("Information").GetComponent <Text> ().text = obj.brand; newitem.transform.Find("Price").GetComponent <Text> ().text = obj.Price.ToString(); newitem.transform.Find("Shipping").GetComponent <Text> ().text = obj.shipping; // newitem.transform.Find ("Image").GetComponent<Image> ().sprite = obj.; }
void vTriggerPulled(bool checkOut) { if (checkOut) { CheckedButton.gameObject.SetActive(true); PersistentData.itemInfo item = new PersistentData.itemInfo(GameObjectHit.GetComponent <ObjectInfo>()); persistentObject.GetComponent <PersistentData>().itemList.Add(item); itemsChecked.Add(GameObjectHit.name); } else { // gonna have to go to the next scene StartCoroutine(takephoneout(7.0f)); } }
void vTriggerPulled(bool checkOut) { if (checkOut) { infoView.transform.Find("Panel/Checked").gameObject.SetActive(true); PersistentData.itemInfo item = new PersistentData.itemInfo(GameObjectHit.GetComponent<ObjectInfo>()); persistentObject.GetComponent<PersistentData>().itemList.Add(item); itemsChecked.Add (GameObjectHit.name); //DontDestroyOnLoad(GameObjectHit.GetComponent<ObjectInfo>()); } else { // gonna have to go to the next scene StartCoroutine(takephoneout(7.0f)); } }