Hi All,
I worked on simple project in that some levels are there.
In that there is restart button. Actlly my problem is when i click my scene that is feeded perfeclty if i comes back and goes to that same scene that is resume only i don’t know that is not started from first.
my code is like this:
var isQuit=false;
function OnMouseEnter () {
renderer.material.color = Color.green;
}
function OnMouseExit () {
renderer.material.color = Color.red;
}
function OnMouseDown()
{
// if we clicked the play button
if (this.name == “Quit”)
{
// load the game
Application.Quit();
}
else
if(this.name==“Phet”)
{
Application.LoadLevel(1);
}
else
if(this.name=="PM")
{
Application.LoadLevel(2);
}
else
if(this.name=="SP")
{
Application.LoadLevel(3);
}
else
if(this.name=="Back")
{
Application.LoadLevel(1);
}
else
if(this.name=="Restart")
{
Application.LoadLevel(2);
}
else
if(this.name=="Back1")
{
Application.LoadLevel(2);
}
else
if(this.name=="Restart1")
{
Application.LoadLevel(3);
}
}
thanks