using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; /// /// 关卡知识点Item /// public class LevelKnowledgeItem : MonoBehaviour { /// /// 是否被使用 /// 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); } } }