26 lines
518 B
C#
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;
|
|
}
|
|
}
|
|
}
|