Support for pause/resume of game rendering loop (#476)

* added pause/resume

* don't override displaymode in game engine

* avoid setting light sensing display mode
This commit is contained in:
Peli de Halleux
2017-08-01 08:17:53 -07:00
committed by GitHub
parent 6a215478b0
commit 74799c65ac
9 changed files with 111 additions and 28 deletions

View File

@ -30,6 +30,8 @@ game.setScore(0);
```cards
game.startCountdown(10000);
game.gameOver();
game.pause();
game.resume();
```
### See also
@ -38,4 +40,5 @@ game.gameOver();
[ifOnEdgeBounce](/reference/game/if-on-edge-bounce), [get](/reference/game/get), [set](/reference/game/set),
[change](/reference/game/change), [isTouching](/reference/game/touching) [isTouchingEdge](/reference/game/touching-edge),
[addScore](/reference/game/change-score-by), [score](/reference/game/score), [setScore](/reference/game/set-score),
[startCountdown](/reference/game/start-countdown), [gameOver](/reference/game/game-over)
[startCountdown](/reference/game/start-countdown), [gameOver](/reference/game/game-over),
[pause](/reference/game/pause), [resume](/reference/game/resume)

View File

@ -0,0 +1,11 @@
# Pause
Pauses the game rendering engine to allow other animations on the screen.
```sig
game.pause()
```
### See Also
[resume](/reference/game/resume)

View File

@ -0,0 +1,11 @@
# Resume
Resumes the game rendering engine after a pause.
```sig
game.resume()
```
### See Also
[pause](/reference/game/pause)