LMQT/Assets/Scripts/DisplayButton.cs
2024-12-10 09:03:45 +08:00

51 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DisplayButton : MonoBehaviour
{
public GameObject QD;
public GameObject JZI;
public GameObject JZII;
public GameObject LB;
public GameObject disLB;
public GameObject disJZII;
public GameObject disJZI;
public GameObject disQD;
public GameObject disLU;
// Start is called before the first frame update
public void dis()
{
if (QD.activeSelf)
{
disLU.SetActive(false);
disQD.SetActive(false);
}
else
{
disLU.SetActive(true);
disQD.SetActive(true);
}
if (JZI.activeSelf)
{
disJZI.SetActive(false);
}
else { disJZI.SetActive(true); }
if (JZII.activeSelf)
{
disJZII.SetActive(false);
}
else { disJZII.SetActive(true); }
}
public void dislb() {
if (LB.activeSelf)
{
disLB.GetComponent<Animator>().Play("ru1");
}
else { disLB.GetComponent<Animator>().Play("ru2"); }
}
}