1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- using System;
- using LitJson;
- using rtc;
- using SC.XR.Unity;
- using TMPro;
- using UnityEngine;
- using UnityEngine.UI;
- using static ScenesManager;
- public class CreateRoom : RemoteSingleton<CreateRoom>
- {
- public TextMeshProUGUI roomName;
- public TextMeshProUGUI roomType;
- public TextMeshProUGUI roomPeopleNum;
- public TextMeshProUGUI isRecode;
- public TextMeshProUGUI isDownload;
- public Toggle toggle;
- public override void initShow()
- {
- base.initShow();
- roomName.text = RoomMainInfo.roomName;
- if (UserInfo.isSN)
- {
- roomType.text = "设备SN账号";
- roomPeopleNum.text = "2人";
- isRecode.text = "不支持";
- isDownload.text = "不支持";
- }
- else if (UserInfo.activateType == 1)
- {
- roomType.text = "未激活账号";
- roomPeopleNum.text = "2人";
- isRecode.text = "不支持";
- isDownload.text = "不支持";
- }
- else
- {
- roomType.text = "激活账号";
- roomPeopleNum.text = "10人";
- isRecode.text = "支持";
- isDownload.text = "支持";
- }
- toggle.onValueChanged.AddListener(remindTip);
- }
- int index;
- public void remindTip(bool isRemind)
- {
- index = isRemind == true ? 1 : -1;
- }
- private bool isClick = false;
- public void Create()
- {
- if (!isClick)
- {
- isClick = true;
- PlayerPrefs.SetInt("isRemindTip", index);
- OfficeWindow.Instance.OnCreateRoom();
- }
- }
- private void OnEnable()
- {
- isClick = false;
- }
- private void OnDisable()
- {
- isClick = false;
- }
- public void Close()
- {
- index = -1;
- toggle.isOn = false;
- ScenesManager.Instance.showOffice(SceneType.OfficeWindow);
- }
- }
|