象棋基础

This commit is contained in:
2026-02-26 11:05:56 +08:00
parent e68fd61b86
commit 3dd5a9bf4e
57 changed files with 18347 additions and 516 deletions
@@ -1,21 +1,44 @@
using Assets.MyGame.Scripts.Net.WebResponses.ChineseChess;
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()
{
btn_Close.onClick.AddListener(() =>
{
uIManager.CloseAll();
WebSocketSendList.GetRoomListChineseChess(1);
});
}
protected override void OnShow(object args = null)
{
base.OnShow(args);
if (args != null)
{
var v = (ChineseChessGameClassList.ChessGameRoom)args;
var v = JsonConvert.DeserializeObject<WebSocketResponseBase<ChessGameRoom>>(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);
});
}
}
}