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.
57 lines
1.1 KiB
57 lines
1.1 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class panding66 : MonoBehaviour
|
|
{
|
|
public DuoXuan dx;
|
|
public GameObject[] gb;
|
|
public static int[] a = new int[4];//代表54的12345题的对错
|
|
public static bool z;//代表第一次初始化
|
|
|
|
private void Start()
|
|
{
|
|
if (!z)
|
|
{
|
|
for (int i = 0; i < a.Length; i++)
|
|
{
|
|
a[i] = -1;
|
|
}
|
|
z = true;
|
|
}
|
|
dx.选项[0] = a[0];
|
|
dx.选项[1] = a[1];
|
|
dx.选项[2] = a[2];
|
|
dx.选项[3] = a[3];
|
|
}
|
|
|
|
public void panding1(int b)
|
|
{
|
|
a[0] = b;
|
|
dx.选项[0] = b;
|
|
}
|
|
public void panding2()
|
|
{
|
|
if (!gb[0].activeSelf && !gb[1].activeSelf)
|
|
{
|
|
a[1] = 0;
|
|
dx.选项[1] = 0;
|
|
}
|
|
else
|
|
{
|
|
a[1] = 1;
|
|
dx.选项[1] = 1;
|
|
}
|
|
}
|
|
public void panding3(int b)
|
|
{
|
|
a[2] = b;
|
|
dx.选项[2] = b;
|
|
}
|
|
public void panding4(int b)
|
|
{
|
|
a[3] = b;
|
|
dx.选项[3] = b;
|
|
}
|
|
}
|