private void OnCollisionEnter2D(Collision2D collision) { /* * // if the bullet is a player bullet and it hits the enemy, subtract health * if (gameObject.tag == "PlayerBullet") * if (collision.gameObject.tag == "Enemy") * collision.gameObject.GetComponent<EnemyManager>().Health-= PlayerFire.instance.gun.WeaponDamage; */ // create an explosion and destroy the bullet StartCoroutine(Effects.BulletHitEffect(gameObject)); }