Example #1
0
        void PhysicsScreenEventHandler(Object sender, EventArgs e)
        {
            GameStateArgs args = (GameStateArgs)e;

            if (args.Args.Length > 0)
            {
                if (args.Args[0] == "title")
                {
                    currentGameState = new TitleScreen(TitleScreenEventHandler, false);
                }
            }
        }
Example #2
0
        void EnterBillEventHandler(Object sender, EventArgs e)
        {
            GameStateArgs args = (GameStateArgs)e;

            if (args.Args.Length > 0 && args.Args[0] == "title")
            {
                currentGameState = new TitleScreen(TitleScreenEventHandler, true);
            }
            else
            {
                currentGameState = new Battle1(Battle1EventHandler, true);
            }
        }
Example #3
0
 void ShooterLevelEventHandler(Object sender, EventArgs e)
 {
     if (e is GameStateArgs)
     {
         GameStateArgs args = (GameStateArgs)e;
         if (args.Args.Length > 0)
         {
             if (args.Args[0] == "title")
             {
                 currentGameState = new TitleScreen(TitleScreenEventHandler, true);
             }
         }
     }
 }
Example #4
0
        void EnterCarChase1EventHandler(Object sender, EventArgs e)
        {
            GameStateArgs args = (GameStateArgs)e;

            if (args.Args.Length > 0)
            {
                if (args.Args[0] == "title")
                {
                    currentGameState = new TitleScreen(TitleScreenEventHandler, true);
                }
                else if (args.Args[0] == "carchase")
                {
                    currentGameState = new CarChase1(CarChase1EventHandler);
                }
            }
        }
Example #5
0
        void Battle1EventHandler(Object sender, EventArgs e)
        {
            GameStateArgs args = (GameStateArgs)e;

            if (args.Args.Length > 0)
            {
                if (args.Args[0] == "title")
                {
                    currentGameState = new TitleScreen(TitleScreenEventHandler, true);
                }
                else if (args.Args[0] == "endbattle1")
                {
                    currentGameState = new EndBattle1(EndBattle1EventHandler);
                }
            }
        }
Example #6
0
 void Battle2EventHandler(Object sender, EventArgs e)
 {
     if (e is GameStateArgs)
     {
         GameStateArgs args = (GameStateArgs)e;
         if (args.Args.Length > 0)
         {
             if (args.Args[0] == "title")
             {
                 currentGameState = new TitleScreen(TitleScreenEventHandler, true);
             }
             else if (args.Args[0] == "postgame")
             {
                 currentGameState = new PostGame(PostGameEventHandler);
             }
         }
     }
 }
Example #7
0
 void CarChase1EventHandler(Object sender, EventArgs e)
 {
     if (e is GameStateArgs)
     {
         GameStateArgs args = (GameStateArgs)e;
         if (args.Args.Length > 0)
         {
             if (args.Args[0] == "title")
             {
                 currentGameState = new TitleScreen(TitleScreenEventHandler, true);
             }
         }
     }
     else if (e is CharacterArgs)
     {
         CharacterArgs chars = (CharacterArgs)e;
         if (chars.Chars.Length == 2)
         {
             currentGameState = new EndCarChase1(EndCarChase1EventHandler, chars.Chars[0], chars.Chars[1]);
         }
     }
 }
Example #8
0
        void TitleScreenEventHandler(Object sender, EventArgs e)
        {
            GameStateArgs args = (GameStateArgs)e;

            if (args.Args.Length > 0)
            {
                if (args.Args[0] == "enterbill")
                {
                    currentGameState = new EnterBill(EnterBillEventHandler);
                    //currentGameState = new EndBattle1(EndBattle1EventHandler);
                    //currentGameState = new EnterCarChase1(EnterCarChase1EventHandler);
                    //currentGameState = new PostGame(PostGameEventHandler);
                    //currentGameState = new Battle2(Battle2EventHandler);
                }
                else if (args.Args[0] == "physics")
                {
                    currentGameState = new PhysicsScreen(PhysicsScreenEventHandler);
                }
                else if (args.Args[0] == "entercarchase")
                {
                    currentGameState = new EnterCarChase1(EnterCarChase1EventHandler);
                }
                else if (args.Args[0] == "test")
                {
                    currentGameState = new Battle2(Battle2EventHandler);
                }
                else if (args.Args[0] == "rts")
                {
                    currentGameState = new Rts(RtsEventHandler);
                }
                else if (args.Args[0] == "shooter")
                {
                    currentGameState = new ShooterLevel(ShooterLevelEventHandler);
                }
            }
        }