123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- using System;
- using LitJson;
- using SC.XR.Unity;
- using UnityEngine;
- using UnityEngine.UI;
- using static ScenesManager;
- public class CreateRoom : RemoteSingleton<CreateRoom>
- {
- public Text roomName;
- public Text roomType;
- public Text roomPeopleNum;
- public Text isRecode;
- public Text 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);
- }
- }
|