Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == Level3Tags.LevelThreePlayer)
     {
         _player.PlayerDamaged();
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == Level3Tags.LevelThreePlayer)
     {
         player.PlayerDamaged();
     }
     else if (collision.gameObject.tag == Tags.flameBulletTag)
     {
         Destroy(collision.gameObject);
     }
 }
Ejemplo n.º 3
0
 private void OnTriggerEnter2D(Collider2D target)
 {
     if (target.gameObject.tag == Level3Tags.LevelThreePlayer)
     {
         _player.PlayerDamaged();
     }
     else if (target.gameObject.tag == Tags.flameBulletTag)
     {
         _main.DamageAudio();
         MantisDamaged();
         Destroy(target.gameObject);
     }
 }
Ejemplo n.º 4
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == Level3Tags.LevelThreePlayer)
     {
         canExplode = true;
         main.ExplosionAudio();
         anim.SetBool("BombExplode", true);
         player.PlayerDamaged();
         Destroy(this.gameObject, 1.5f);
         // Destroy(collision.gameObject);
     }
     else if (collision.gameObject.tag == Tags.flameBulletTag)
     {
         canExplode = true;
         main.ExplosionAudio();
         anim.SetBool("BombExplode", true);
         Destroy(this.gameObject, 1.5f);
         Destroy(collision.gameObject);
     }
 }