using SC.XR.Unity; using System; using System.Collections.Generic; using static ScenesManager; public class RoomOtherUser : RemoteSingleton { public static Action ShowAction; public NormalList Nlist; private void Start() { // UpdateList(); } public override void initShow() { base.initShow(); UpdateList(); } private List vs = new List(); public void UpdateList() { if (vs.Count > 0) { vs.Clear(); } List list = new List(); //CustomPeerList peerlist = RemoteRtc.Instance.customPeerList; //PeerConfig pconfig; //for (int i = 0; i < peerlist.getPaiXuPeers().Count; i++) //{ // CustomPeer peer = (CustomPeer)peerlist.getPeer(peerlist.getPaiXuPeers()[i]); // if (!peer.isShow) // { // pconfig = new PeerConfig(); // pconfig.name = peer.name; // pconfig.peer = peer; // list.Add(pconfig); // vs.Add(pconfig.peer.peerId); // } //} if (InviteDlg.Instance && InviteDlg.Instance.InvitingUnionIdList.Count > 0) { for (int i = InviteDlg.Instance.InvitingUnionIdList.Count - 1; i >= 0; i--) { if (vs.Contains(InviteDlg.Instance.InvitingUnionIdList[i].UnionId)) { InviteDlg.Instance.InvitingUnionIdList.Remove(InviteDlg.Instance.InvitingUnionIdList[i]); } } for (int i = 0; i < InviteDlg.Instance.InvitingUnionIdList.Count; i++) { list.Add(InviteDlg.Instance.InvitingUnionIdList[i]); } //if (peerlist.getPeers().Count + InviteDlg.Instance.InvitingUnionIdList.Count < RoomMainInfo.roomMaxPeopleNum - 1) //{ // BaseConfig baseConfig = new BaseConfig(); // list.Add(baseConfig); //} } else { //if (peerlist.getPeers().Count < RoomMainInfo.roomMaxPeopleNum - 1 && RoomMainInfo.isCreator == "0") //{ // BaseConfig baseConfig = new BaseConfig(); // list.Add(baseConfig); //} } Nlist.initList(list); list.Clear(); vs.Clear(); } }