87 lines
1.6 KiB
C#
87 lines
1.6 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ButtonTemp : MonoBehaviour
|
|
{
|
|
public List<Button> buttons;
|
|
|
|
public App app;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
buttons[0].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("1");
|
|
|
|
});
|
|
buttons[1].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("2");
|
|
|
|
});
|
|
buttons[2].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("3");
|
|
|
|
});
|
|
buttons[3].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("4");
|
|
|
|
});
|
|
buttons[4].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("5");
|
|
|
|
});
|
|
buttons[5].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("6");
|
|
|
|
});
|
|
buttons[6].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("7");
|
|
|
|
});
|
|
buttons[7].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("8");
|
|
|
|
});
|
|
buttons[8].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("9");
|
|
|
|
});
|
|
buttons[9].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("10");
|
|
|
|
});
|
|
buttons[10].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("11");
|
|
|
|
});
|
|
buttons[11].onClick.AddListener(() =>
|
|
{
|
|
app.SetState("12");
|
|
|
|
});
|
|
buttons[12].onClick.AddListener(() =>
|
|
{
|
|
|
|
|
|
});
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|