Quantcast
Channel: Answers for "Using yield wait for seconds in my script, correctly"
Viewing all articles
Browse latest Browse all 4

Answer by BiG

$
0
0
I would modify the script as below. Just add the sound and the "stage complete" text! var countdown = false; function Update(){ var bricks = GameObject.FindWithTag("brick"); if(bricks == null && !countdown){ countdown = true; NextLevel(); } } function NextLevel(){ yield WaitForSeconds (5); Application.LoadLevel(Application.loadedLevel + 1); }

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>