I would like to check if gameEngine is paused in if statement, but it seems there is no such method.
if (isGameEnginePaused) {
//Do something
}
If you are within a FlameGame
instance you can simply check the paused
flag.
class YourGame extends FlameGame {
...
if(paused) {
// whatever you want to do
}
}
Do note that the update
-loop won't be running when the game is paused, so you can't do the check within an update
method.
To check from outside of the game you can just use:
if(game.paused) {
// whatever you want to do
}