pxt-calliope/docs/reference/game/is-paused.md
Juri Wolf 77ed2ccfb1
V4 updates (#210)
* update pxt.json files

* Fix button event enums

fixes https://github.com/microsoft/pxt-calliope/issues/206

* Fix Safari CSS Rule for iOS app

fixes https://github.com/microsoft/pxt-calliope/issues/205

* aprove preffered repos

should fix https://github.com/microsoft/pxt-calliope/issues/167
2023-01-11 09:51:27 -08:00

28 lines
514 B
Markdown

# is Paused
Find out if the game is paused or not.
```sig
game.isPaused()
```
## Returns
* a [boolean](/types/boolean) value that is `true` if the game is paused or `false` if not.
## Example
Resume the game if it's paused and button **B** is pressed.
```blocks
input.onButtonEvent(Button.B, input.buttonEventValue(ButtonEvent.Down), function () {
if (game.isPaused()) {
game.resume()
}
})
```
## See also
[is running](/reference/game/is-running),
[is game over](/reference/game/is-game-over)