using Assets.MyGame.Scripts.Net; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; using Assets.MyGame.Scripts.Net.APIRequest.Params; using Assets.MyGame.Scripts.Net.APIResponses; public class UIHome_BY_JJJPanel : SubUIBase { public Button btn_Receive; public Image img_DisReceive; public TextMeshProUGUI txt_coinsNum; public TextMeshProUGUI txt_TimeNum; public override void Awake() { base.Awake(); //添加金币 btn_Receive.onClick.AddListener(() => { APIRequestList.GetRelief((callvack)=> { UIManager.Instance.ShowBoardGongGao("救济金领取成功"); //这里弹窗领取成功 }); }); } protected override void OnShow(object args = null) { base.OnShow(args); var jjjData = GameManager.Instance.gameConfig.reliefConfigs; txt_coinsNum.text = "金币" + jjjData.gold.ToString(); if (GameManager.Instance.user.assets.gold < jjjData.limit&& GameManager.Instance.user.@static.reliefGoldCount>0) img_DisReceive.gameObject.SetActive(false); else img_DisReceive.gameObject.SetActive(true); } }