31 lines
695 B
C#
Raw Normal View History

2024-11-26 15:44:50 +08:00
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class TaskItem : MonoBehaviour
{
2024-12-18 12:02:32 +08:00
[SerializeField] private Text textPro;
2024-11-26 15:44:50 +08:00
[SerializeField] private Image start;
public void InitData(int levelID, int id)
{
var data = JsonTab.Instance.tables.Task.Get(id);
textPro.text = JsonTab.Instance.tables.DisplayTxt.Get(data.Describe).Text;
start.color = DataManager.GetTask(levelID, id) ? Color.white : Color.gray;
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}