internal void PlayerOthersRemove(string key, ref List <string> notifyMsg) { var url = this.FromUrl; OthersRemove or = new OthersRemove() { c = "OthersRemove", WebSocketID = this.WebSocketID, othersKey = key }; var sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(or); notifyMsg.Add(url); notifyMsg.Add(sendMsg); }
// public delegate void SysRemovePlayerByKey(string key, ref List<string> msgsWithUrl); // public SysRemovePlayerByKey SysRemovePlayerByKeyF; internal void othersRemove(string key, ref List <string> notifyMsg) { if (this.others.ContainsKey(key)) { // SysRemovePlayerByKeyF(key, ref notifyMsg); var url = this.FromUrl; OthersRemove or = new OthersRemove() { c = "OthersRemove", WebSocketID = this.WebSocketID, othersKey = key }; var sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(or); notifyMsg.Add(url); notifyMsg.Add(sendMsg); this.others.Remove(key); } }