gdquest-demos / godot-3-beginner-2d-platformer

Learn to create a 2d platform game with the Godot game engine. This is a beginner programming tutorial.
MIT License
364 stars 96 forks source link

Death counts reset when retrying #26

Closed henriiquecampos closed 5 years ago

henriiquecampos commented 5 years ago

Since we have the reload_scene logic on the RetryButton now, always calling PlayerData.reset() the player's death count is always reset, making so that at the End Screen the player always has 0 deaths.

Previously only the End Screen made a full PlayerData.reset(), while the UserInterface' just set the PlayerData.score = 0 when its RetryButton was pressed