Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Paddle")
     {
         SoundSystem SFXPlayer = FindObjectOfType <SoundSystem>();
         if (SFXPlayer)
         {
             SFXPlayer.PlayClip(pickupSound);
         }
         pickupTable.ApplyEffect(pickupType);
         DestroyThis();
     }
     if (collision.gameObject.tag == "LoseCollider")
     {
         DestroyThis();
     }
 }
Exemple #2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == tags.PADDLE)
     {
         SoundSystem SFXPlayer = FindObjectOfType <SoundSystem>();
         if (SFXPlayer)
         {
             SFXPlayer.PlayClipOnce(pickupSound);
         }
         pickupTable.ApplyEffect(pickupType);
         DestroyThis();
     }
     if (collision.gameObject.tag == tags.LOSE_COLLIDER)
     {
         DestroyThis();
     }
 }