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))); }
private JsonNetEvents(NetGame game, NetPeer connection, NetMessageTypes types) { _game = game; _connection = connection; _types = types; }
public JsonNetEvents(NetGame game, NetMessageTypes types) : this(game, game.Net, types) { }
private JsonNetGame(NetGame net, JsonNetEvents events) { _net = net; _events = events; }