Haydoggo / Beach-Escape

MIT License
0 stars 0 forks source link

add a restart level button to the esc pause menu #18

Closed plexsoup closed 7 months ago

plexsoup commented 7 months ago

Sometimes levels won't end. Maybe a shark is pressed up against a rock, or whatever. Other times, the player isn't happy with a strategy they've deployed, so they'd like to retry the level.

Add a restart level button to the pause menu.

plexsoup commented 7 months ago

I added a restart level button to the pause menu, which invokes SceneLoader.load_scene(), but it's not working. Maybe SceneLoader caches the scene UID and won't reload if it's the same scene.

plexsoup commented 7 months ago

Changed SceneLoader.load_scene() to get_tree().restart_current_level()