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.

97 lines
2.6 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DuoXuan : BaseView
{
// Start is called before the first frame update
public int[] ;
public List<int> ;
public Toggle[] toggles1;
public GameObject , ;
public GameObject next, myscene, nextscene;
public Button btn_, btn_, btn_;
void Start()
{
toggles1 = GetComponentsInChildren<Toggle>();
= GetChild(transform, "NoAnswerTip");
= GetChild(transform, "OverTip");
GameObject CtrlWnd = GetChild(transform, "CtrlWnd");
btn_ = GetChild<Button>(CtrlWnd.transform, "SubmitBtn");
btn_ = GetChild<Button>(.transform, "OK");
// btn_已作答提交 = GetChild<Button>(提交完毕.transform, "OK");
btn_.onClick.RemoveAllListeners();
btn_.onClick.RemoveAllListeners();
// btn_已作答提交.onClick.RemoveAllListeners();
AddListener(btn_, );
AddListener(btn_, );
// AddListener(btn_已作答提交, 确认提交);
}
// Update is called once per frame
void Update()
{
}
public void ()
{
for (int i = 0; i < toggles1.Length; i++)
{
int k = i;
if (toggles1[i].isOn)
{
.Add(k+1);
}
}
= new int[.Count];
for (int i = 0; i < .Count; i++)
{
[i] = [i];
}
if (.Length > 0)
{
//提交完毕.SetActive(true);
();
}
else
{
.SetActive(true);
}
}
public void ()
{
if (.Length == 0)
{
= new int[] {0 };
}
GameRoot.SubmitMoreChoiceAnswer(Windows.Instance., Windows.Instance., );
// Windows.Instance.提交中.SetActive(true);
Windows.Instance.++;
gameObject.SetActive(false);
if (next != null)
{
next.SetActive(true);
}
if (nextscene != null)
{
nextscene.SetActive(true);
}
if (myscene != null)
{
myscene.SetActive(false);
}
if (next == null)
{
GameRoot.SubmitPassState(Windows.Instance., true);
GameRoot.ReturnMenu();
}
}
}