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.

59 lines
1.5 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DanXuan :BaseView
{
public int = -1;
public Toggle[] toggles1;
public Button[] buttons;
public GameObject next;
public Button btn_;
private void Start()
{
for (int i = 0; i < toggles1.Length; i++)
{
int k = i;
toggles1[i].onValueChanged.AddListener((bool bo) => ToggleCtrl(bo, k));
}
for (int i = 0; i < buttons.Length; i++)
{
int k = i;
buttons[i].onClick.AddListener(() => ButtonCtrl(k));
}
btn_.onClick.RemoveAllListeners();
AddListener(btn_, );
}
public void ()
{
GameRoot.SubmitChoiceAnswer(Windows.Instance., Windows.Instance., );
//Windows.Instance.提交中.SetActive(true);
Windows.Instance.++;
//gameObject.SetActive(false);
if (next != null)
{
next.SetActive(true);
}
if (next == null)
{
gameObject.SetActive(true);
GameRoot.SubmitPassState(Windows.Instance., true);
remake.a = 0;
remakeTwo.a = 0;
GameRoot.ReturnMenu();
}
}
public void ToggleCtrl(bool bo, int id)
{
if (bo)
{ = id + 1; }
}
public void ButtonCtrl(int id)
{
= id + 1;
}
}