Пример #1
0
    private void OnTriggerEnter(Collider other)
    {
        //if (this gameobject) is a spinshot, run a function that collects the powerup

        if (gameObject.CompareTag("spinShot"))
        {
            if (other.CompareTag("Player"))
            {
                if (!powerups.spinShotActive)
                {
                    powerups.CollectSpinShot();
                    Destroy(gameObject);
                }
            }
        }
    }