Hey Guys,
Im new and am confused why im getting this message in unity "Unexpected token: position". Any help is appreciated! Thank you~
#pragma strict
var nextLevel : boolean;
function Update()
{
nextLevel = true;
for each(Collider in Physics.OverlapSphere(position: Vector3, radius: float))
{
if(co.gameObject.tag == "Enemy")
{
nextLevel = false;
}
}
if(nextLevel)
{
Application.LoadLevel(levelIndex : int);
}
}
↧