Tweaked bomb

This commit is contained in:
2018-04-21 15:47:24 +10:00
parent 7d10afcbf9
commit a8741ccc26
+6 -4
View File
@@ -46,9 +46,11 @@ public class Bomb : MonoBehaviour {
}
IEnumerator ExplodeAfter(float delay) {
yield return new WaitForSeconds (delay);
explosion.SetActive (true);
transform.DetachChildren ();
Destroy (gameObject);
if (delay >= 0) {
yield return new WaitForSeconds (delay);
explosion.SetActive (true);
transform.DetachChildren ();
Destroy (gameObject);
}
}
}