public void OnTriggerEnter(Collider other)
    {
        PowerUpController powerUpController = other.gameObject.GetComponent <PowerUpController>();

        if (powerUpController != null)
        {
            powerUpController.AddPowerUp(powerUp);
            if (feedbackAudioClip != null)
            {
                AudioSource.PlayClipAtPoint(feedbackAudioClip, transform.position, 1.0f);
            }
            Destroy(this.gameObject);
        }
    }
Exemple #2
0
 internal void AddPowerUp(PowerUp pPowerUp)
 {
     powerUpController.AddPowerUp(pPowerUp);
 }