34 lines
1020 B
C#
34 lines
1020 B
C#
using Assets.MyGame.Scripts.Net.WebResponses.ChineseChess;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UIChineseChessSetCoin : SubUIBase
|
|
{
|
|
public TextMeshProUGUI tmp_CurrGlod;
|
|
public TMP_InputField tmpInput_Coin;
|
|
public Button btn_Enter;
|
|
public override void Awake()
|
|
{
|
|
base.Awake();
|
|
|
|
}
|
|
public override void Show(object args = null)
|
|
{
|
|
base.Show(args);
|
|
if (args != null)
|
|
{
|
|
var v = (ChineseChessGameClassList.ChessGameRoom)args;
|
|
tmp_CurrGlod.text = GameManager.Instance.user.assets.gold.ToString();
|
|
btn_Enter.onClick.RemoveAllListeners();
|
|
btn_Enter.onClick.AddListener(() =>
|
|
{
|
|
WebSocketSendList.SelectGlodChineseChess(v.roomId,Convert.ToInt32( tmpInput_Coin.text)<100?100: Convert.ToInt32(tmpInput_Coin.text),GameManager.Instance.user.id);
|
|
});
|
|
}
|
|
}
|
|
}
|