Tweaked bomb

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