You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Investigate having some events for when a window that a kiwi game resides on goes out of focus/comes into focus. Then can look at pausing the update loop/game timer/e.t.c.
The text was updated successfully, but these errors were encountered:
You can now add events for blur, focus, and visibility by accessing the appropriate Signals on the Stage. Also you get the visibility state of the game by accessing the visibility property on the Stage.
//Signals
this.game.stage.onFocus.add( this.inFocus, this );
this.game.stage.onBlur.add( this.notInFocus, this );
this.game.stage.onVisibilityChange.add( this.visiblityChanged, this );
//....
if( this.game.stage.visibility ) {
//Resume game logic
} else {
//Pause the game
}
Investigate having some events for when a window that a kiwi game resides on goes out of focus/comes into focus. Then can look at pausing the update loop/game timer/e.t.c.
The text was updated successfully, but these errors were encountered: