c# - Pausing in unity -


i trying pause game in unity using timescale , setting 0 when pause panel comes , setting 1 when panel disabled. problem having when pause, buttons on panel not showing animation time scale 0. there anyway around this? or should find way pause without using timescale. appreciated, thanks.

a possibility maintain state of game using enum. e.g., define enum as:

enum gamestate {     started,     loading,     playing,     paused,     completed } 

declare variable of type gamestate in session or place access easy you, compare:

if(currentgamestate == gamestate.playing) {       // play logic here }  

Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -