Пример #1
0
        public static JsonNetGame ConnectTo(string appId, string host, int port, params Type[] types)
        {
            var netMessageTypes = new NetMessageTypes(types);
            var net             = NetGame.CreateClient(appId, host, port, new JsonEventNetDataMessageHandler(netMessageTypes));

            return(new JsonNetGame(net, new JsonNetEvents(net, netMessageTypes)));
        }
Пример #2
0
 private JsonNetEvents(NetGame game, NetPeer connection, NetMessageTypes types)
 {
     _game       = game;
     _connection = connection;
     _types      = types;
 }
Пример #3
0
 public JsonNetEvents(NetGame game, NetMessageTypes types) : this(game, game.Net, types)
 {
 }
Пример #4
0
 private JsonNetGame(NetGame net, JsonNetEvents events)
 {
     _net    = net;
     _events = events;
 }