_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/kuangChang10/KuangChangPop.cs

34 lines
1.3 KiB
C#
Raw Normal View History

2024-12-05 15:49:54 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
2024-12-06 16:14:45 +08:00
using Unity.VisualScripting;
2024-12-05 15:49:54 +08:00
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class KuangChangPop : MonoBehaviour
{
queryMiningContractList101 queryMiningContractList = new queryMiningContractList101();//10.110.1<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><EFBFBD><EFBFBD>Լ
MiningContractList miningContractList = new MiningContractList();
2024-12-06 16:14:45 +08:00
[Header("<22><>Լ<EFBFBD><D4BC><EFBFBD>ڵ<EFBFBD>")] public GameObject ItemParent;
[Header("<22><>ԼԤ<D4BC><D4A4><EFBFBD><EFBFBD>")] public GameObject kuanghcangItem;
2024-12-05 15:49:54 +08:00
// Start is called before the first frame update
2024-12-06 16:14:45 +08:00
2024-12-05 15:49:54 +08:00
async void Start()
{
2024-12-06 16:14:45 +08:00
2024-12-05 17:02:12 +08:00
//<2F><>ѯ<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD>Լ
2024-12-05 15:49:54 +08:00
miningContractList = await queryMiningContractList.QueryMiningContract();
Debug.Log(miningContractList.data.Count);
for (int i = miningContractList.data.Count -1; i >= 0; i--)
2024-12-05 17:02:12 +08:00
{
2024-12-05 15:49:54 +08:00
var miningContract = miningContractList.data[i];
GameObject item = Instantiate(kuanghcangItem);
item.transform.parent = ItemParent.transform;
NewkuangchangItem newiItem = item.GetComponent<NewkuangchangItem>();
2024-12-05 17:02:12 +08:00
newiItem.count.text = miningContract.voluteCoinBuy.ToString();//<2F><>ʾÿһ<C3BF><D2BB><EFBFBD><EFBFBD>Լ<EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>踳ֵ
newiItem.miningContract = miningContractList.data[i];//<2F><>ÿһ<C3BF><D2BB><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC>ֵ
2024-12-05 15:49:54 +08:00
}
}
}