Files
5.24BuYu/Assets/MyGame/aa/UI/Game/ChineseChess/UIChineseChessJoinRoom.cs
T
2026-02-13 19:23:01 +08:00

29 lines
842 B
C#

using Assets.MyGame.Scripts.Net.WebResponses.ChineseChess;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class UIChineseChessJoinRoom : SubUIBase
{
public TMP_InputField tMPInput_Password;
protected override void OnShow(object args = null)
{
base.OnShow(args);
if (args != null)
{
var v = (ChineseChessGameClassList.ChessGameRoom)args;
tMPInput_Password.text = "";
tMPInput_Password.onValueChanged.RemoveAllListeners();
tMPInput_Password.onValueChanged.AddListener((a) =>
{
if (a.Length == 6)
{
WebSocketSendList.JoinGameChineseChess(v.roomId,a,GameManager.Instance.user.id);
}
});
}
}
}