using System.Collections; using System.Collections.Generic; using LitJson; using ShadowStudio.Mgr; using ShadowStudio.Model; using UnityEngine; using UnityEngine.UI; public class CustomPeer : SCRtcPeer { public bool isCloseAudio =false; private bool _isCloseVideo =false; public bool isCloseVideo { get { return _isCloseVideo; } set { _isCloseVideo = value; this.onChangeTexture(); } } public GameObject bigView; public bool isShow; public int Index { get; set; } public GameObject Quad; public delegate void OnChangeTexture(); public OnChangeTexture onChangeTexture; public delegate void OnChangeName(string n); public OnChangeName onChangeName; public delegate void OnChangeInfo(string type, string id); public OnChangeInfo onChangeInfo; public override void setInfo(string type, string id,bool isOpen) { base.setInfo(type, id, isOpen); if (onChangeInfo != null) { onChangeInfo(type, id); } } public override void setName(string n) { base.setName(n); if (onChangeName != null) { onChangeName(n); } } public void changeInfo(string info, CustomPeer customPeer) { if(customPeer.cIdA == info) { cIdA = ""; } else { cIdV = ""; //if (bigNameID == data["data"]["peerId"].ToString()) //{ // Debug.Log("PPT2"); // bigMr.material.mainTexture = t2fang; //} //if (cp.isBig) //{ // cp.bigView.GetComponent().onChangeCloseInfo(); //} } } public override void setTexture(JsonData data) { base.setTexture(data); showVideo(data); if (onChangeTexture != null) { onChangeTexture(); } } public override void changeTexture(JsonData data) { base.changeTexture(data); changeVideo(data); } public void changeVideo(JsonData data) { } public void addQuad(GameObject peerQuad) { } public void showVideo(JsonData data) { } }