Cute_demon_attacks/meng_yao/Assets/script/scene_Main/ManurePanel.cs

31 lines
694 B
C#
Raw Normal View History

2024-12-20 21:03:36 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
2025-01-07 11:48:49 +08:00
using UnityEngine.UI;
2024-12-20 21:03:36 +08:00
public class ManurePanel : MonoBehaviour
{
public GameObject[] DropArrays;
async void Start()
{
TreeInfo info = await Scene_main_jiekou.instance.TreeInfoS();
for (int i = 0; i < info.Data.Rewards.Count; i++)
{
2024-12-25 12:02:14 +08:00
if (info.Data.Rewards[i].Show ==1)
2024-12-20 21:03:36 +08:00
{
2025-01-07 11:48:49 +08:00
DropArrays[i].transform.Find("Text").GetComponent<Text>().text = info.Data.Rewards[i].reward+"g";
2024-12-25 12:02:14 +08:00
DropArrays[i].gameObject.SetActive(true);
2025-01-07 11:48:49 +08:00
2024-12-20 21:03:36 +08:00
}
}
}
// Update is called once per frame
void Update()
{
}
}