12345678910111213141516171819202122232425262728293031323334353637 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class CustomPeerList : SCRtcPeers
- {
- public ItemList iList;
- public GameObject peerQuad;
- public override void removePeers(string pid)
- {
- CustomPeer p = (CustomPeer)getPeer(pid);
- if(p.isBig)
- {
- p.bigView.GetComponent<BigVideoManager>().closeRemove();
- }
- // getPeer(pid).Quad.GetComponent<MeshRenderer>().material.mainTexture = new Texture2D(640, 480, TextureFormat.RGB24, false);
- // GameObject.Destroy(getPeer(pid).Quad);
- base.removePeers(pid);
- //quadManager();
- iList.initList(this);
- }
- public override SCRtcPeer addPeers(string pid)
- {
- CustomPeer p = new CustomPeer();//实例了子类,这句话就是调用子类方法而不调用父类方法的原因
- p.peerId = pid;
- base.addPeers(p);
- // if (peerQuad!=null)
- // p.addQuad(peerQuad);
- //quadManager();
- iList.initList(this);
- return p;
- }
- public void quadManager()
- {
- }
- }
|