private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == Level3Tags.LevelThreePlayer) { _player.PlayerDamaged(); Destroy(this.gameObject); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == Level3Tags.LevelThreePlayer) { player.PlayerDamaged(); } else if (collision.gameObject.tag == Tags.flameBulletTag) { Destroy(collision.gameObject); } }
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); } }
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); } }