pk400 / sprout-2d

2D Platforming game engine for crazy developers. Built using the SFML C++ library for super awesome 2D fun! Placeholder assets while custom assets are a work in progress.
0 stars 0 forks source link

Prevent States from stacking #2

Open pk400 opened 6 years ago

pk400 commented 6 years ago

When the game runs it starts off in the Menu State. When the player clicks the Start Game button, it will initialize the Play State. However, when the player presses the Esc key on their keyboard they are sent back to the Menu State, but the Play State is still loaded.

Intended Result

When the player hits Esc it should save the current Play State and then load up the Menu State. It should restore the same Play State when they select it again in the menu.