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
Post a Comment