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?
↧