OtagoPolytechnic / Duck

Duck is a roguelike top-down wave shooter. This is a student project.
https://forms.gle/hCBFjTrNGyyv8ZxT9
GNU General Public License v3.0
3 stars 0 forks source link

Static variables are not reset when exiting to the main menu #43

Closed AlexReidNZ closed 4 weeks ago

AlexReidNZ commented 1 month ago

Describe the bug When the player gets a game over, the static variables for the game such as the enemy stat multipliers are not reset.

To Reproduce Steps to reproduce the behavior:

  1. Play the game until you get a game over
  2. Return to main menu
  3. Play again
  4. Enemies will have a very large amount of health

Expected behavior The enemy health should be at a reasonable amount when restarting the game.

Additional context This should be a simple fix, simply call the ResetVariables() method from the GameManager script when returning to the main menu.

PBWiseman commented 1 month ago

Getting fixed in #53