30 lines
586 B
C#
30 lines
586 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
/// <summary>
|
|
/// ¹Ø¿¨ÖªÊ¶µãItem
|
|
/// </summary>
|
|
public class LevelKnowledgeItem : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// ÊÇ·ñ±»Ê¹ÓÃ
|
|
/// </summary>
|
|
public bool is_used;
|
|
public TextMeshProUGUI knowledge_point_text;
|
|
|
|
public void Init(string _knowledge_text)
|
|
{
|
|
knowledge_point_text.text = _knowledge_text;
|
|
}
|
|
|
|
public void UpdateState()
|
|
{
|
|
if (is_used != gameObject.activeSelf)
|
|
{
|
|
gameObject.SetActive(is_used);
|
|
}
|
|
}
|
|
}
|