Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D other)           // on collision getting the game object to detect the player TAg then add points depending on ScoreGive   " IMPORTANT TO WRITE EACH word CORRECTly or Unity wont understand  "OnTriggerEnter2D"
 {
     if (other.gameObject.tag == "Player")
     {
         //ShieldOn = true;
         sound           = PlayClipAt(Audio);
         sound.volume    = 0.2f;
         sound.panStereo = 0;
         //Debug.Log("dont bash");
         WingsON = true;
         PwUpManager.ActivateWingPower(WingsON, WingsDuration);
         gameObject.SetActive(false);
     }
 }