I want to make a typical “tap to screen” thing in my game. That means that my game is paused when it starts, and it resumes as soon as I tap on the screen.
Normally I would do this with a
Time.timeScale=0;
statement. The thing is that I’ve prepared a mini-animation that I want to run while I’m in this “pause mode” and this is frozen too.
What can I do? Can I exclude specific gameobjects or scripts from pausing with Time.timeScale=0 or something like that?
you will then have to do it with every class, which might become messy…
last possiblity might be to make something like:
bool IsOn {
get {
return GameObject.Find("TimeController").GetComponent<TimeControlClass>().IsOn;
}
}
/*And then in Update when you want things disabled when it's not on*/
void Update () {
if(IsOn)
DoThis();
}
Each possiblity have problems and are annoying in each their way. if you got questions, just ask
try to make a mainGameLoop script with one update and one start , then call all the updates of the other scripts in this update… now if the game is paused choose the updates the you want to avoid …