54 lines
1.0 KiB
C#
54 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using GCGame.Table;
|
|
|
|
public class EnterPassWordPanel : MonoBehaviour {
|
|
|
|
public static EnterPassWordPanel Instance;
|
|
private void Awake()
|
|
{
|
|
Instance = this;
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
Instance = null;
|
|
}
|
|
|
|
public InputField _InputText;
|
|
|
|
private int _RoomId;
|
|
public void InitRoomId(int roomId)
|
|
{
|
|
_RoomId = roomId;
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
_InputText.text = "";
|
|
}
|
|
|
|
public void OnPartInBtn()
|
|
{
|
|
if(_InputText.text.Equals(""))
|
|
{
|
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{1289}"));
|
|
return;
|
|
}
|
|
|
|
ReqHonorBattlefieldMatchJoinRoom req = new ReqHonorBattlefieldMatchJoinRoom();
|
|
req.RoomId = _RoomId;
|
|
req.Password = _InputText.text;
|
|
req.SendMsg();
|
|
|
|
OnMaskClick();
|
|
}
|
|
|
|
public void OnMaskClick()
|
|
{
|
|
this.gameObject.SetActive(false);
|
|
}
|
|
}
|