Super Knight : Enter the Dungeon
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.
 
 
 
 

29 lines
668 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ButtonUnused : MonoBehaviour
{
public bool STARTUP_UNUSED = false;
public Button btn;
[Header("미사용시 켜져야 할 오브젝트 리스트")]
public List<GameObject> listDisable;
private void Awake()
{
OnSetting(!STARTUP_UNUSED);
}
public void OnReverse()
{
OnSetting(!btn.interactable);
}
public void OnSetting(bool STATE)
{
btn.interactable = STATE;
for (int i = 0; i < listDisable.Count; i++)
listDisable[i].gameObject.SetActive(!STATE);
}
}