private void OnTriggerEnter2D(Collider2D collision) { EnemyHealth enemy = collision.GetComponent <EnemyHealth>(); if (enemy != null) { enemy.Damaget(damage); } if (collision.gameObject.tag == "Enemy") { isAlive = false; anim.SetTrigger("Bom"); } }