Example #1
0
        static void Main(string[] args)
        {
            MenuState startMenu     = new MenuState("MineEscape", "\n\nRobert Rouhani, Craig Carlson, Domenic Cristaldi\n\nRPI Game Dev Club Gamejam 10/27/2012\n\n\n\nPress any key to continue...");
            MenuState objectiveMenu = new MenuState("Objective", "\nA miner has accidentally unleashed an evil force deep in the mines.\nYou are the lone survivor who must escape the cave.\nFind the generator to activate power for the floor.\nEscape through the lift.\n\n\n\nPress any key to continue...");
            MenuState controlsMenu  = new MenuState("Controls", "\nWASD to move\n\nE to interact\n\nEsc to quit\n\n\nPress any key to continue...");

            startMenu.OnPopped +=
                (s, e) =>
            {
                startMenu.Reset();
                StateManager.PushState(startMenu);                         //reset and loop
                StateManager.PushState(objectiveMenu);
            };
            objectiveMenu.OnPopped +=
                (s, e) =>
            {
                StateManager.PushState(controlsMenu);
            };
            controlsMenu.OnPopped += (s, e) => StateManager.PushState(new GameState(1));
            StateManager.PushState(startMenu);
            using (var window = new EscapeGameWindow())
            {
                window.Run();
            }
        }
 static void Main(string[] args)
 {
     MenuState startMenu = new MenuState("MineEscape", "\n\nRobert Rouhani, Craig Carlson, Domenic Cristaldi\n\nRPI Game Dev Club Gamejam 10/27/2012\n\n\n\nPress any key to continue...");
     MenuState objectiveMenu = new MenuState("Objective", "\nA miner has accidentally unleashed an evil force deep in the mines.\nYou are the lone survivor who must escape the cave.\nFind the generator to activate power for the floor.\nEscape through the lift.\n\n\n\nPress any key to continue...");
     MenuState controlsMenu = new MenuState("Controls", "\nWASD to move\n\nE to interact\n\nEsc to quit\n\n\nPress any key to continue...");
     startMenu.OnPopped +=
         (s, e) =>
         {
             startMenu.Reset();
             StateManager.PushState(startMenu); //reset and loop
             StateManager.PushState(objectiveMenu);
         };
     objectiveMenu.OnPopped +=
         (s, e) =>
         {
             StateManager.PushState(controlsMenu);
         };
     controlsMenu.OnPopped += (s, e) => StateManager.PushState(new GameState(1));
     StateManager.PushState(startMenu);
     using (var window = new EscapeGameWindow())
     {
         window.Run();
     }
 }