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.

122 lines
3.2 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class PanDuan : BaseView
{
public bool[] =new bool[1];
public List<bool> ;
public int index;
public GameObject ,;
public GameObject next, myscene, nextscene;
public Button btn_, btn_, btn_;
public bool ;
void Start()
{
if (.Length == 0)
{
= new bool[] { false };
}
if ( == null)
{ = 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 ()
{
if ()
{
// 提交完毕.SetActive(true);
();
}
else
{
.SetActive(true);
}
}
public void ()
{
GameRoot.SubmitOprerationAnswer(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();
}
}
public void SetButton(bool bo)
{
= true;
[index] = true;
index++;
Debug.LogError("设置选项为" + bo);
}
public void ()
{
= true;
}
public void SetButtonOne(bool bo)
{
= true;
if (EventSystem.current.currentSelectedGameObject.GetComponent<Toggle>() != null)
{
if (EventSystem.current.currentSelectedGameObject.GetComponent<Toggle>().isOn)
{
[index] = bo;
if (bo)
{ Debug.LogError("设置选项为" + bo); }
}
}
else
{
[index] = bo;
if (bo)
{ Debug.LogError("设置选项为" + bo); }
}
}
public void SetOne(bool bo)
{
= true;
[index] = bo;
if (bo)
{ Debug.LogError("设置选项为" + bo); }
}
}