82 lines
2.0 KiB
C#
82 lines
2.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
|
|
//md FUCK everthing
|
|
//ʷɽ£¬±ðѧ
|
|
public class mainBTN : MonoBehaviour
|
|
{
|
|
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()
|
|
{
|
|
|
|
}
|
|
}
|