From 2dc14087800be412e86b762a93db2c5336908b87 Mon Sep 17 00:00:00 2001 From: JamieLeveridge Date: Mon, 15 Nov 2021 16:56:07 +0000 Subject: [PATCH] Added the new function to the bomb script --- Unity-Files/Assets/Scripts/Gameplay/BombPowerUp.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Unity-Files/Assets/Scripts/Gameplay/BombPowerUp.cs b/Unity-Files/Assets/Scripts/Gameplay/BombPowerUp.cs index b74ca91..db78ea4 100644 --- a/Unity-Files/Assets/Scripts/Gameplay/BombPowerUp.cs +++ b/Unity-Files/Assets/Scripts/Gameplay/BombPowerUp.cs @@ -37,12 +37,7 @@ public class BombPowerUp : MonoBehaviour { if (boats.CompareTag("Enemy")) { - if (explosionEffect != null) - { - GameObject newDeathEffect = Instantiate(explosionEffect); - newDeathEffect.transform.position = boats.gameObject.transform.position; - } - Destroy(boats.gameObject); + boats.GetComponent().DestroyShip(); } } }