RoomMainInfo.cs 1.6 KB

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