34 lines
778 B
C#
34 lines
778 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ShowDisObjByToggle : MonoBehaviour
|
|
{
|
|
public OperateState OperateCon;
|
|
public GameObject[] Objs;
|
|
int i;
|
|
public void ShowDis(Toggle tog)
|
|
{
|
|
if (tog.isOn)
|
|
{
|
|
for (i = 0; i < Objs.Length; i++)
|
|
Objs[i].SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
for (i = 0; i < Objs.Length; i++)
|
|
Objs[i].SetActive(false);
|
|
}
|
|
}
|
|
public GameObject OneObj;
|
|
public void ShowDis()
|
|
{
|
|
OneObj.SetActive(!OneObj.activeSelf);
|
|
if (OneObj.activeSelf)
|
|
OperateCon.EnterUIOpreation();
|
|
else
|
|
OperateCon.EnterRoleOpreation();
|
|
}
|
|
}
|