In the current game I'm building, I'm having trouble moving from one game state to another. I'm using enum
to control my states. As of now, this is my enum
:
public static enum State
{
M_MENU, LEVEL_01;
}
public static State state = State.M_MENU;
The corresponding state loads as it should based on which state I change it to manually within the code. The problem I'm having is changing from M_MENU to LEVEL_01 from within the game. I thought that maybe I could set the state from within a mouseListener
when the mouse clicks within a specific bound of an image, but the state didn't change. Keep in mind, I only have two states that I'm trying to flip through. Anyone ran into a similar problem as this? I'm just trying to move from the menu to the first level by clicking on the "START" image.