Esempio n. 1
0
    void OnTriggerStay(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            //InventoryManager.ActionKeyTwo = true;
            //Debug.Log (InventoryManager.ActionKeyTwo);
            //Debug.Log (InventoryManager.ActionKeyOne);
            if (InventoryManager.ActionKeyOne == true)
            {
                for (int i = 0; i < inventory.slots.Length; i++)
                {
                    if (inventory.isFull [i] == false)
                    {
                        inventory.objects.Add(BoxAdd);
                        inventory.InventorySprite.Add(SpriteBoxAdd);

                        pickUpManager.GetComponent <PickUpManager> ().PickedUpObject();

                        gameObject.SetActive(false);
                        break;
                    }
                }
            }
        }
    }