ConnectManager.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class ConnectManager : MonoBehaviour
  5. {
  6. public List<BaseConfig> peerList;
  7. public BaseList bl;
  8. public static ConnectManager Instance;
  9. public Game3DInputField nameText;
  10. void Start()
  11. {
  12. Instance = this;
  13. nameText.text = PlayerPrefs.GetString("name");
  14. peerList = new List<BaseConfig>();
  15. bl.UpdateConfigs(peerList);
  16. }
  17. // Update is called once per frame
  18. void Update()
  19. {
  20. }
  21. public void AddPeer(SCRtcPeer sCRtcPeer)
  22. {
  23. /*
  24. sCRtcPeer.isChoose = false;
  25. peerList.Add(sCRtcPeer);
  26. if (peerList[0] == sCRtcPeer)
  27. {
  28. sCRtcPeer.isChoose = true;
  29. }
  30. Debug.Log("AddPeer" + 777);
  31. bl.UpdateConfigs(peerList);
  32. bl.CurrentPage = bl.SumPage;
  33. bl.Refresh();*/
  34. }
  35. public void RemovePeer(SCRtcPeer sCRtcPeer)
  36. {
  37. /*
  38. sCRtcPeer.isChoose = false;
  39. peerList.Remove(sCRtcPeer);
  40. Debug.Log("Remove" + 333);
  41. bl.UpdateConfigs(peerList);
  42. bl.CurrentPage = bl.SumPage;
  43. bl.Refresh();*/
  44. }
  45. }