using Assets.MyGame.Scripts.Net; using Assets.MyGame.Scripts.Net.WebResponses.ChineseChess; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; using static Assets.MyGame.Scripts.Net.WebResponses.ChineseChess.ChineseChessGameClassList; public class UIChineseChessRoomExplain : SubUIBase { public TextMeshProUGUI tmp_roomExplain; public TextMeshProUGUI password; public Button consent; public override void Awake() { } protected override void OnShow(object args = null) { base.OnShow(args); if (args != null) { var v = JsonConvert.DeserializeObject>(args.ToString()).arguments[0]; //设置完分数更新房间信息 ((ChineseChessMainPanel)uIManager.parentUIBase).roomData = v; tmp_roomExplain.text = "局时:无限制\n" + "步时:60秒\n读秒:30\n底分:" + v.gold; password.text = v.password; consent.onClick.RemoveAllListeners(); consent.onClick.AddListener(() => { WebSocketSendList.GameReadyChineseChess(v.roomId,GameManager.Instance.user.id); uIManager.Close(UIPanel.ZGXQGameExplain); }); btn_Close.onClick.RemoveAllListeners(); btn_Close.onClick.AddListener(() => { uIManager.CloseAll(); WebSocketSendList.ExitRoomChineseChess(v.roomId, GameManager.Instance.user.id); }); } } }