예제 #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);
 }