/// <summary> /// 往接收端中添加发送端信息 /// </summary> /// <param name="send"></param> public void AddReceiveDistanced(DistanceData send) { if (Distanced == null) { Distanced = new List <DistanceData>(); } //移除正在交互的 if (Distanceing.Contains(send)) { Distanceing.Remove(send); } if (Distanced.Contains(send)) { return; } Distanced.Add(send); if (maxCount == -1) { return; } maxCount--; }
public void RemoveReceiveDistancing(DistanceData send) { if (Distanceing == null) { return; } if (!Distanceing.Contains(send)) { return; } Distanceing.Remove(send); }
/// <summary> /// 往接收端中添加发送距离信息 /// </summary> /// <param name="send"></param> public void AddReceiveDistancing(DistanceData send) { if (Distanceing == null) { Distanceing = new List <DistanceData>(); } if (Distanceing.Contains(send)) { return; } Distanceing.Add(send); }