31 lines
706 B
C#
31 lines
706 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using TMPro;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class TaskItem : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField] private TextMeshProUGUI textPro;
|
||
|
[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()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|