60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using static Assets.MyGame.Scripts.Net.WebResponses.ChineseChess.ChineseChessGameClassList;
|
|
|
|
public class HintData
|
|
{
|
|
public ChessGameRoom roomData;
|
|
public int hintType; //1求和2认输
|
|
}
|
|
public class ChineseChessMainPanel : GameMainPanel_Base
|
|
{
|
|
|
|
public Button btn_QiuHe;
|
|
public Button btn_RenShu;
|
|
public ChessGameRoom roomData;
|
|
public override void Awake()
|
|
{
|
|
base.Awake();
|
|
|
|
}
|
|
protected override void OnShow(object args = null)
|
|
{
|
|
base.OnShow(args);
|
|
subUIManager.ShowAsync(UIPanel.ZGXQDistrict, args);
|
|
}
|
|
public void InitRoomData(ChessGameRoom roomData)
|
|
{
|
|
btn_QiuHe.onClick.RemoveAllListeners();
|
|
btn_RenShu.onClick.RemoveAllListeners();
|
|
btn_QiuHe.onClick.AddListener(() =>
|
|
{
|
|
subUIManager.ShowAsync(UIPanel.ZGXQHint, new HintData
|
|
{
|
|
roomData = roomData,
|
|
hintType=1
|
|
});
|
|
});
|
|
btn_RenShu.onClick.AddListener(() =>
|
|
{
|
|
subUIManager.ShowAsync(UIPanel.ZGXQHint, new HintData
|
|
{
|
|
roomData = roomData,
|
|
hintType = 2
|
|
});
|
|
});
|
|
}
|
|
|
|
public void Start()
|
|
{
|
|
|
|
}
|
|
protected override void OnHide()
|
|
{
|
|
base.OnHide();
|
|
Screen.orientation = ScreenOrientation.LandscapeLeft;
|
|
}
|
|
}
|