Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Loading new level after killing enemies

$
0
0
Hello i just started using unity3d, and i have some basic javascript expirience,what i want is when i kill all my enemies a new level should load, i used this: function OnCollisionStay (col : Collision) { if(col.gameObject.name == "Bullet(Clone)") { Application.LoadLevel("menu"); Destroy(col.gameObject); Destroy(gameObject); } } it worked but it will load new level after killing only one enemy. How can i make it to load a new level after killing all 6 enemies?

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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