예제 #1
0
        void HostLobbyEventHandler(Object sender, EventArgs e)
        {
            if (e is StartGameArgs)
            {
                StartGameArgs args = (StartGameArgs)e;

                CurrentGameState = new Rts(RtsEventHandler, args.NetPeer, args.Team);
            }
            else if (e is GameStateArgs)
            {
                GameStateArgs args = (GameStateArgs)e;
                if (args.Args.Length > 0)
                {
                }
            }
        }
예제 #2
0
        void StartMenuEventHandler(Object sender, EventArgs e)
        {
            if (e is StartGameArgs)
            {
                StartGameArgs args = (StartGameArgs)e;

                CurrentGameState = new Rts(RtsEventHandler, args.NetPeer, args.Team);
            }
            else if (e is GameStateArgs)
            {
                GameStateArgs args = (GameStateArgs)e;
                if (args.Args.Length > 0)
                {
                    if (args.Args[0] == "exit")
                    {
                        Game.Exit();
                    }
                    else if (args.Args[0] == "create")
                    {
                        CurrentGameState = new HostLobby(HostLobbyEventHandler);
                    }
                }
            }
        }
예제 #3
0
파일: Game1.cs 프로젝트: nubington/rts
        void StartMenuEventHandler(Object sender, EventArgs e)
        {
            if (e is StartGameArgs)
            {
                StartGameArgs args = (StartGameArgs)e;

                CurrentGameState = new Rts(RtsEventHandler, args.NetPeer, args.Team);
            }
            else if (e is GameStateArgs)
            {
                GameStateArgs args = (GameStateArgs)e;
                if (args.Args.Length > 0)
                {
                    if (args.Args[0] == "exit")
                    {
                        Game.Exit();
                    }
                    else if (args.Args[0] == "create")
                    {
                        CurrentGameState = new HostLobby(HostLobbyEventHandler);
                    }
                }
            }
        }
예제 #4
0
파일: Game1.cs 프로젝트: nubington/rts
        void HostLobbyEventHandler(Object sender, EventArgs e)
        {
            if (e is StartGameArgs)
            {
                StartGameArgs args = (StartGameArgs)e;

                CurrentGameState = new Rts(RtsEventHandler, args.NetPeer, args.Team);
            }
            else if (e is GameStateArgs)
            {
                GameStateArgs args = (GameStateArgs)e;
                if (args.Args.Length > 0)
                {
                }
            }
        }