Ejemplo n.º 1
0
        protected virtual void OnTriggerEnter(Collider other)
        {
            if (other.tag == "Player")
            {
                m_MainChar = other.GetComponent <MainCharacter>();                //Get the MainCharacter component (class) of the player's gameObject
                m_MainChar.ActivatePowerUp(m_PowerID, 0f);

                Destroy(this.gameObject);                 //Disappear power up
            }
        }