void Start()
 {
     hasItem = false;
     if (transform.parent != null && isResult == false)
     {
         CombineItems = this.GetComponentInParent <CombineItems>();
     }
 }
Exemple #2
0
    void Start()
    {
        UIItems       = GameObject.FindGameObjectWithTag("Item UI").GetComponentsInChildren <SetItemAsActive>();
        combineScript = GameObject.FindGameObjectWithTag("Item Manager").GetComponent <CombineItems>();
        inv           = PlayerInventory.Instance;
        trigger       = GetComponent <TriggerInteract>();
        dropScript    = GameObject.FindGameObjectWithTag("Player Manager").GetComponent <DropItem>();

        // IItem doesn't have access to the gameobject it is attached to
        test = Resources.Load <GameObject>("TestPrefab").GetComponent <Transform>();
        // Debug.Log(test.gameobject);
    }