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); } } } }