public void OnPointerClick(PointerEventData eventData) { inventar = GameObject.Find ("Inventory").GetComponent<InventarScript> (); if (gameObject.GetComponent<ItemScript> ().usable) { if(gameObject.GetComponent<ItemScript>().count > 0) { inventar.setQuestion(gameObject); } } }
// Use this for initialization void Start() { characterMouseLook = GetComponent<MouseLook> (); mcamera = GameObject.Find("Main Camera").GetComponent<MouseLook> (); fpscontroller = GetComponent<FPSInputController> (); motion = GameObject.Find ("Arms").GetComponent<MotionScript> (); inventory = GameObject.Find ("Inventory").GetComponent<InventarScript> (); inventory.pausedTheGame (false); tutorial = GameObject.Find ("Tut").GetComponent<TutScript> (); }
// Use this for initialization void Start() { inventory = GameObject.Find("Inventory").GetComponent<InventarScript>(); ui = GameObject.Find ("GUI").GetComponent<UIScript> (); if(tod == null) tod = GameObject.Find ("TOD").GetComponent<TOD> (); lastTimeFish = -1F; }
void Start() { inventar = GameObject.Find ("Inventory").GetComponent<InventarScript> (); if(craftingcorrect == null) craftingcorrect = GameObject.Find("CraftingCorrect").audio; if(craftingwrong == null) craftingwrong = GameObject.Find("CraftingWrong").audio; }