Пример #1
0
    void OnCollisionEnter(Collision collision)
    {
        if (collision.transform.tag == "Loot")
        {
            Destroy(collision.gameObject);
            var loot = LootManager.GetLoot();

            //Somehow add this to my inventory and show it in the inventory UI in game
            AddToInventory(loot);

            Debug.Log("You found a " + loot.GetName() + "!");
        }
    }