You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
952 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class Level04 : MonoBehaviour
{
public Button[] buttons;
public int currentAnswer = 0;
public int PassIndex;
private void Start()
{
for (int i = 0; i < buttons.Length; i++)
{
int index = i;
buttons[i].onClick.AddListener(() => {
currentAnswer = index + 1;
});
}
}
public void SubmitAnswer()
{
GameRoot.SubmitChoiceAnswer(PassIndex, 1, currentAnswer);
}
public void ReturnMenu()
{
GameRoot.ReturnMenu();
}
public void ReloadScene(string scneName)
{
SceneManager.LoadScene(scneName);
}
public void CheckPassOver(int level)
{
GameRoot.SubmitPassState(level, true);
}
}