12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- 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);
- //if(PopPeerView.Instance)
- //{
- // for (int j = 0; j < PopPeerView.Instance.bigList.Count; j++)
- // {
- // if (PopPeerView.Instance.bigList[j].cPeer.peerId == pid)
- // {
- // PopPeerView.Instance.bigList[j].closeView();
- // }
- // }
- //}
- //if(RoomMain.Instance.userId == pid)
- //{
- // bool isBigShow=false;
- // foreach (CustomPeer peer in getPeers().Values)
- // {
- // if (!peer.isShow&& pid!=peer.peerId)
- // {
- // isBigShow = true;
- // RoomMain.Instance.setBigView(peer.tex, peer.peerId);
- // }
- // }
- // if(!isBigShow)
- // {
- // RoomMain.Instance.setBigView(RemoteRtc.Instance.NoUser,"nouser");
- // }
- //}
- //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;
- }
- }
|