Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 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);
 }