_xiaofang/xiaofang/Assets/yhj/scripts/ClassItem.cs

45 lines
1.1 KiB
C#
Raw Normal View History

2024-11-30 17:43:21 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ClassItem : MonoBehaviour
{
public Text classname;
public Button NoSelectedBtn;
public Button SelectedBtn;
public Text SelectedBtntext;
public GameObject JuesechoicePop;
// Start is called before the first frame update
void Start()
{
NoSelectedBtn.onClick.AddListener(OpenJueseChoicePop);
SelectedBtn.onClick.AddListener(OpenJueseChoicePop);
setClassItem();
}
public void setClassItem()
{
if(true)
{
SelectedBtn.gameObject.SetActive(true);
SelectedBtntext.text = "<22><>ɫ<EFBFBD><C9AB>";
NoSelectedBtn.gameObject.SetActive(false);
}
else
{
NoSelectedBtn.gameObject.SetActive(true);
SelectedBtn.gameObject.SetActive(false);
}
}
void OpenJueseChoicePop()
{
JuesechoicePop.SetActive(true);
}
// Update is called once per frame
void Update()
{
}
}