RoomMainInfo.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using rtc;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. public class RoomMainInfo
  6. {
  7. public static string RoomOwner;
  8. public static string roomPeerID;
  9. public static string roomName
  10. {
  11. get
  12. {
  13. return "用户" + UserInfo.userName + "的房间";
  14. }
  15. }
  16. public static string roomNum;
  17. public static int roomMaxPeopleNum
  18. {
  19. get
  20. {
  21. if (isCreator == "0")
  22. {
  23. if (UserInfo.isSN)
  24. {
  25. return 2;
  26. }
  27. else if (UserInfo.activateType == 1)
  28. {
  29. return 2;
  30. }
  31. else
  32. {
  33. return 10;
  34. }
  35. }
  36. else
  37. {
  38. if (isSN)
  39. {
  40. return 2;
  41. }
  42. else if (RoomCreatorActivateType == 1)
  43. {
  44. return 2;
  45. }
  46. else
  47. {
  48. return 10;
  49. }
  50. }
  51. }
  52. }
  53. public static string isCreator;//0代表房主
  54. public static int RoomCreatorActivateType;
  55. public static bool isSN;
  56. public static int roomPeopleNum
  57. {
  58. get
  59. {
  60. if (RemoteRtc.Instance.customPeerList != null)
  61. {
  62. return RemoteRtc.Instance.customPeerList.getPeers().Count+1;
  63. }
  64. return 0;
  65. }
  66. }
  67. public static void CreateRoom()
  68. {
  69. }
  70. }