您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

42 行
1.1 KiB

using UnityEngine;
using UnityEngine.UI;
using VContainer;
namespace Unity.Multiplayer.Samples.BossRoom.Visual
{
public class LobbyCreationUI : MonoBehaviour
{
[SerializeField] InputField m_LobbyNameInputField;
[SerializeField] GameObject m_LoadingIndicatorObject;
[SerializeField] Toggle m_IsPrivate;
[SerializeField] CanvasGroup m_CanvasGroup;
[Inject] LobbyUIMediator m_LobbyUIMediator;
void Awake()
{
EnableUnityRelayUI();
}
void EnableUnityRelayUI()
{
m_LoadingIndicatorObject.SetActive(false);
}
public void OnCreateClick()
{
m_LobbyUIMediator.CreateLobbyRequest(m_LobbyNameInputField.text, m_IsPrivate.isOn);
}
public void Show()
{
m_CanvasGroup.alpha = 1f;
m_CanvasGroup.blocksRaycasts = true;
}
public void Hide()
{
m_CanvasGroup.alpha = 0f;
m_CanvasGroup.blocksRaycasts = false;
}
}
}