1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
-
- using System;
- using System.Text.RegularExpressions;
- using SC.XR.Unity;
- using TMPro;
- using UnityEngine;
- using UnityEngine.UI;
- using static ScenesManager;
- public class JoinRoom : RemoteSingleton<JoinRoom>
- {
- public SCInputField fieldName;
- public TextMeshProUGUI remind;
- public override void initShow()
- {
- base.initShow();
- fieldName.text = "";
- remind.gameObject.SetActive(false);
- fieldName.onValueChanged.RemoveAllListeners();
- fieldName.onValueChanged.AddListener(UserValueChanged);
- }
- private void UserValueChanged(string arg0)
- {
- remind.gameObject.SetActive(false);
- }
- public void showOffice()
- {
- ScenesManager.Instance.showOffice(SceneType.OfficeWindow);
- }
- public bool isClick = false;
- private void OnEnable()
- {
- isClick = false;
- }
- private void OnDisable()
- {
- isClick = false;
- }
- public void Join()
- {
- if (fieldName.text != "" && !isClick)
- {
- isClick = true;
- OfficeWindow.Instance.OnJoinRoom(fieldName.text);
- }
- else
- {
- remind.text = "请输入房间号";
- remind.gameObject.SetActive(true);
- }
-
- // ScenesManager.Instance.showWindow(SceneType.ShowRoom);
- }
- }
|