Martiny Posted April 1, 2014 Share Posted April 1, 2014 I'm using the game.scale.forceOrientation to force my game to play always on landscape, showing a image to the player saying that they should turn their phones if it is on portrait. The problem is: the game is still running in the background even when it is in the wrong orientation. Shouldn't it pause by default? How could I pause? It doesn't really have to be a "fancy" pause really, I'm just trying to mimic what happens when you unfocus the window the game is running in. plicatibu 1 Link to comment Share on other sites More sharing options...
jflowers45 Posted April 1, 2014 Share Posted April 1, 2014 not forcing a pause gives the developer maximum flexibilityhere's where I'd put pause/unpause code enterIncorrectOrientation: function () { BasicGame.orientated = false; document.getElementById('orientation').style.display = 'block'; //INSERT PAUSE LOGIC HERE }, leaveIncorrectOrientation: function () { BasicGame.orientated = true; document.getElementById('orientation').style.display = 'none'; //INSERT UNPAUSE LOGIC HERE } plicatibu 1 Link to comment Share on other sites More sharing options...
Recommended Posts