_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/Scene_main/mainBTN.cs

84 lines
2.1 KiB
C#
Raw Normal View History

2024-11-25 22:14:18 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
//md FUCK everthing
//ʷɽ<CAB7><C9BD><EFBFBD><EFBFBD>ѧ
public class mainBTN : MonoBehaviour
2024-11-25 23:46:35 +08:00
{
public GameObject mainPanel;
2024-11-25 22:14:18 +08:00
public GameObject BTN_0;
public GameObject BTN_1;
public GameObject BTN_2;
public GameObject BTN_3;
public GameObject BTN_0_0;
public GameObject BTN_1_1;
public GameObject BTN_2_2;
public GameObject BTN_3_3;
// Start is called before the first frame update
void Start()
{
BTN_0.GetComponent<Button>().onClick.AddListener(()=> {
BTN_0.SetActive(false);
BTN_1.SetActive(true);
BTN_2.SetActive(true);
BTN_3.SetActive(true);
BTN_0_0.SetActive(true);
BTN_1_1.SetActive(false);
BTN_2_2.SetActive(false);
BTN_3_3.SetActive(false);
});
BTN_1.GetComponent<Button>().onClick.AddListener(() => {
BTN_0.SetActive(true);
BTN_1.SetActive(false);
BTN_2.SetActive(true);
BTN_3.SetActive(true);
BTN_0_0.SetActive(false);
BTN_1_1.SetActive(true);
BTN_2_2.SetActive(false);
BTN_3_3.SetActive(false);
});
BTN_2.GetComponent<Button>().onClick.AddListener(() => {
BTN_0.SetActive(true);
BTN_1.SetActive(true);
BTN_2.SetActive(false);
BTN_3.SetActive(true);
BTN_0_0.SetActive(false);
BTN_1_1.SetActive(false);
BTN_2_2.SetActive(true);
BTN_3_3.SetActive(false);
});
BTN_3.GetComponent<Button>().onClick.AddListener(() => {
BTN_0.SetActive(true);
BTN_1.SetActive(true);
BTN_2.SetActive(true);
BTN_3.SetActive(false);
BTN_0_0.SetActive(false);
BTN_1_1.SetActive(false);
BTN_2_2.SetActive(false);
BTN_3_3.SetActive(true);
});
}
// Update is called once per frame
void Update()
{
}
}