pxt-calliope/docs/reference/game/is-paused.md
2020-02-20 04:01:37 +01:00

497 B

is Paused

Find out if the game is paused or not.

game.isPaused()

Returns

  • a 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.

input.input.onButtonEvent(Button.B, ButtonEvent.Click, function () {
	if (game.isPaused()) {
        game.resume()
    }
})

See also

is running, is game over