123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using UnityEngine;
- public class ItemList : BaseList
- {
- public GameObject[] setting;
- List<BaseConfig> cList;
- public void initList(CustomPeerList cpl)
- {
- Dictionary<string, SCRtcPeer> sList = cpl.getPeers();
- // if(sList.Count>0)
- // {
- //List<BaseConfig> cList = new List<BaseConfig>();
- cList = new List<BaseConfig>();
- foreach (SCRtcPeer value in sList.Values)
- {
- CustomPeer cp = (CustomPeer)value;
- if(!cp.isBig)
- cList.Add(cp);
- }
- UpdateConfigs(cList);
- // }
- }
- public void AddList(CustomPeer customPeer)
- {
- if (!customPeer.isBig)
- cList.Add(customPeer);
- UpdateConfigs(cList);
- }
- public void RemoveList(CustomPeer customPeer)
- {
- if (!customPeer.isBig)
- cList.Remove(customPeer);
- UpdateConfigs(cList);
- }
- bool isShow=false;
- public void changeSetting()
- {
- for (int i = 0; i < setting.Length; i++)
- {
- setting[i].SetActive(!isShow);
- }
- isShow = !isShow;
- }
- }
|