Boolean value does not change due to scene restarting too fast.

In my script i have a boolean that becomes true when a function is called (Round Over). Round over function is only called once and it restarts the scene. My problem is though that roundOver boolean doesnt get time to become true (i printed in the console) and stays false because it restarts the scene straight after. How do i get roundOver to become true at least once so i can do something in the Update() while roundOver is true.

public void Start(){
    		roundOver = false;
    	}

 public static void RoundOver(){
    	if(curRound >= roundCount)
    	    {
    		GameOver();
    	}else{
         print ("round over");
         roundOver = true;
         curRound++;
    	 Application.LoadLevel(Application.loadedLevel);
     }
   }

You could call the Application.LoadLevel() in another function and Invoke it.

Add a new function called NewScene(or what you want to call it, it doesnt matter) and Invoke it in your void RoundOver().

This way you can delay the time before the next scene gets called.

 public static void RoundOver(){
         if(curRound >= roundCount)
             {
             GameOver();
         }else{
          print ("round over");
          roundOver = true;
          curRound++;

         //the second parameter value stands for when  the Invoke gets executed after invoking it.
         Invoke("NewScene",1.0f);
      }
    }

void NewScene()
{
 Application.LoadLevel(Application.loadedLevel);
}

You can call a coroutine and use yield WaitForSeconds(1.0) to wait a second for the logic in your update loop to execute.