NG_/Scripts/UI/数据框/TFBoxActive.cs
2024-12-13 18:49:44 +08:00

26 lines
518 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TFBoxActive : MonoBehaviour
{
public List<GameObject> TFBoxes;
public void OnEnable()
{
foreach (GameObject tfBox in TFBoxes)
{
tfBox.GetComponent<BoxCollider>().enabled = false;
}
}
public void OnDisable()
{
foreach (GameObject tfBox in TFBoxes)
{
tfBox.GetComponent<BoxCollider>().enabled = true;
}
}
}