コード例 #1
0
ファイル: Application.cs プロジェクト: tgy/CSharp
        void JoinGame(MenuState m)
        {
            var client = new TcpClient();
            client.Connect(((MenuTextBox)m.Items[2]).Value, 4242);

            var p = new PlayState(new Client(client), ((MenuTextBox) m.Items[1]).Value, ref _gameStates);
            p.Initialize();
            p.LoadContent(Content);
            _gameStates.Push(p);
        }
コード例 #2
0
ファイル: Application.cs プロジェクト: tgy/CSharp
 void CreateGame(MenuState m)
 {
     var p = new PlayState(new Server().AcceptClient(), ((MenuTextBox) m.Items[1]).Value, ref _gameStates, true);
     p.Initialize();
     p.LoadContent(Content);
     _gameStates.Push(p);
 }