void Update() { if (col.calculated) { col.calculated = false; i = col.getItemType(); gameObject.GetComponent <ItemCollector>().setItemType(i); } }