Added the new function to the bomb script

This commit is contained in:
JamieLeveridge 2021-11-15 16:56:07 +00:00
parent dd68ea4e65
commit 2dc1408780

View File

@ -37,12 +37,7 @@ public class BombPowerUp : MonoBehaviour
{ {
if (boats.CompareTag("Enemy")) if (boats.CompareTag("Enemy"))
{ {
if (explosionEffect != null) boats.GetComponent<EnemyReturn>().DestroyShip();
{
GameObject newDeathEffect = Instantiate<GameObject>(explosionEffect);
newDeathEffect.transform.position = boats.gameObject.transform.position;
}
Destroy(boats.gameObject);
} }
} }
} }