Project_WL/Assets/Script/UI/Common/BotMenu.cs

25 lines
438 B
C#
Raw Normal View History

2024-12-15 01:39:39 +00:00
using UnityEngine;
public class BotMenu : MonoBehaviourSingletonTemplate<BotMenu>
{
public Transform tf_layout;
bool bOn = true;
private void OnEnable()
{
Set_OnOff();
}
void Set_OnOff()
{
2024-12-29 00:15:03 +00:00
for (int i = 0; i < tf_layout.childCount; i++)
2024-12-15 01:39:39 +00:00
tf_layout.GetChild(i).gameObject.SetActive(bOn);
}
public void OnClick_OnOff()
{
bOn = !bOn;
Set_OnOff();
}
}