public void Update() { if (inTrigger) { if (Input.GetKey("t")) { itemsList item = player.GetComponent <itemsList> (); item.items.Add(kit); kittext.SetActive(false); kit.SetActive(false); } } }
public void Update() { if (inTrigger) { itemsList item = player.GetComponent <itemsList> (); if (item.items.Count < 5) { text.SetActive(true); } else if (item.items.Count == 5) { text1.SetActive(true); } if (item.items.Count == 5 && Input.GetKey("o")) { text1.SetActive(false); Cursor.visible = false; Initiate.Fade("DreamForestTree/DemoScene", Color.black, 0.5f); } } }