Hello. I would like a new level to load when my player touches the end banner game object. But if I add an if statement in the OnTriggerEnter function it does not work. Here’s my code:
function OnTriggerEnter ()
{
if(gameObject.name == "End Banner" && otherScript.restSeconds > 0)
{
LevelCompleted();
}
}
function LevelCompleted()
{
Application.LoadLevel("Win");
}