public void NewSession(NetConnection client) { var session = new PlayerSession(client, this); playerSessions.Add(playerSessions.Values.Count + 1, session); }
/// <summary> /// Creates a new session for a client. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> public void NewSession(object sender, NetChannelArgs args) { var session = new PlayerSession(args.Channel, this); _sessions.Add(args.Channel.NetworkId, session); }