deep-entertainment / issues

Issue tracker for deep Entertainment projects
1 stars 0 forks source link

Helper function for pauses #24

Closed MikaelNyqvist closed 2 years ago

MikaelNyqvist commented 2 years ago

Doing EgoVenture migrations from the Wintermute engine, Thomas came up with a little helper function for simulating Wintermute interactivity. However, it would be useful way outside the Wintermute migrations, since it allows creating of pauses, taking Parrot, Boombox and Speedy into account in one single line of code. It consists of a simple addition to core.gd:


    if !state:
        Parrot.ignore_pause = true
        Boombox.ignore_pause = true
        Speedy.hidden = true
        get_tree().paused = true
    else:
        get_tree().paused = false
        Speedy.hidden = false
        Boombox.ignore_pause = false
        Parrot.ignore_pause = false

The pause is then created with `Core.game_interactive(false/true)`

I suggest the addition of this handy little function.
dploeger commented 2 years ago

Please test this by downloading branch "issue-24": https://github.com/deep-entertainment/egoventure-example-game/archive/refs/heads/issue-24.zip

dploeger commented 2 years ago

Fixed the sound issue, please test again.