hi guys i have a game manager script that i manage to pause the game when my player collide with an object by using Time.timescale but is there a alternative ways that i can pause only the timesystem and the game continue running if not then pause the game but the timesystem contiune running?
gamemanager.js
function Update(){
//if(isPaused == false){
if(!Paused){
Paused=false;
}
else
{
Time.timeScale = 0;
Paused=true;
}
if(Input.GetButtonUp(“Jump”)){
Time.timeScale = 1;
Paused=false;
//starttime = Time.time;
//time += Time.deltaTime;
OnGUI();
}
}
function OnGUI () {
Debug.Log(“OnGUI”);
var guiTime = Time.time - startTime;
restSeconds = countDownSeconds - (guiTime);
//display messages or whatever here -->do stuff based on your timer
if (restSeconds == 60) {
print ("One Minute Left");
}
if (restSeconds == 0) {
print ("Time is Over");
restSeconds = 0;
Application.LoadLevel("2");
//do stuff here
Paused = true;