using ShadowStudio.Mgr; using ShadowStudio.Model; using System.Collections; using System.Collections.Generic; using UnityEngine; public class CustomPeerList : SCRtcPeers { public GameObject peerQuad; public override void removePeers(string pid) { CustomPeer p = (CustomPeer)getPeer(pid); Debug.Log("删除=====》"); if(UserItemList.Instance!=null&& UserItemList.Instance.PeerList!=null) { for (int i = 0; i < UserItemList.Instance.PeerList.Count; i++) { if (UserItemList.Instance.PeerList[i].PeerId == p.name) { UserItemList.Instance.DeleteUserItem(UserItemList.Instance.PeerList[i].PeerId); break; } } } base.removePeers(pid); } public override SCRtcPeer addPeers(string pid) { CustomPeer p = new CustomPeer(); p.peerId = pid; base.addPeers(p); return p; } }