Exemplo n.º 1
0
        private void OnCollisionEnter(Collision other)
        {
            if (!other.gameObject.CompareTag("Player"))
            {
                return;
            }

            if (_itemSpawner)
            {
                _itemSpawner.ItemTaken(other.gameObject);
            }
            else
            {
                Destroy(gameObject);
            }
        }