pxt-calliope/docs/reference/game/is-paused.md

28 lines
514 B
Markdown
Raw Permalink Normal View History

# 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)