_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/kuangChang10/KuangChangTest.cs
2024-12-06 16:14:45 +08:00

66 lines
2.5 KiB
C#

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class KuangChangTest : MonoBehaviour
{
queryMiningContractList101 queryMiningContractList = new queryMiningContractList101();//10.110.1,查询可购买的挖矿合约
MiningContractList miningContractList=new MiningContractList();
queryMiningContracDetail102 queryMiningContracDetail = new queryMiningContracDetail102();//10.2
MiningContracDetail miningContracDetail = new MiningContracDetail();
buyMiningContract103 buyMiningContract = new buyMiningContract103();//10.3
queryUserMiningSlot104 queryUserMiningSlot = new queryUserMiningSlot104();//10.4
openSlot105 openSlot5 = new openSlot105();//10.5
queryMyPureContract106 queryMyPureContract = new queryMyPureContract106();//10.6
bindSlot107 bindSlot = new bindSlot107();
queryUserVoluteCoin108 queryUserVoluteCoin = new queryUserVoluteCoin108();
[Header("返回主页按钮")] public Button ReturnButton;
[Header("用户收益")] public TextMeshProUGUI Userdata;
[Header("矿场弹窗")] public GameObject kuanghcangPop;
public SetActiveDelegate onSetActive;
async void Start()
{
//queryMiningContractList.QueryMiningContract();
//miningContracDetail = await queryMiningContracDetail.QueryMiningContracDetail(3);
//bool isBuySucceed = await buyMiningContract.BuyMiningContract(1);
////Debug.Log("====购买===" + isBuySucceed);
////Debug.Log(buyMiningContract.BuyMiningContract(2) + "==========买");
////Debug.Log(openSlot5.OpenSlot() + "===============开卡槽");
//queryMyPureContract.QueryMyPureContract();
//查询矿厂卡槽分页:
queryUserMiningSlot.QueryUserMiningSlot();
//bool isSucceed = await bindSlot.BindSlot(1, 1);
////Debug.Log(isSucceed + "========绑定卡槽");
//miningContractList = await queryMiningContractList.QueryMiningContract();
//onSetActive?.Invoke(false);
//矿厂主页刷新蜗壳值
QueryUserVoluteCoinResponse queryUserVoluteCoinResponse = await queryUserVoluteCoin.QueryUserVoluteCoin();
Userdata.text = queryUserVoluteCoinResponse.data.ToString();
ReturnButton.onClick.AddListener((() => { SceneManager.LoadScene(1);}));
}
private void SetKuanghcangPopActive(bool isActive)
{
if (kuanghcangPop != null)
{
kuanghcangPop.SetActive(isActive);
}
}
// Update is called once per frame
void Update()
{
}
}