Tweaked bomb
This commit is contained in:
@@ -46,9 +46,11 @@ public class Bomb : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator ExplodeAfter(float delay) {
|
IEnumerator ExplodeAfter(float delay) {
|
||||||
yield return new WaitForSeconds (delay);
|
if (delay >= 0) {
|
||||||
explosion.SetActive (true);
|
yield return new WaitForSeconds (delay);
|
||||||
transform.DetachChildren ();
|
explosion.SetActive (true);
|
||||||
Destroy (gameObject);
|
transform.DetachChildren ();
|
||||||
|
Destroy (gameObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user