示例#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;
 }