25 lines
426 B
C#
25 lines
426 B
C#
using UnityEngine;
|
|
|
|
public class ToggleFoliage : MonoBehaviour
|
|
{
|
|
public GameObject[] foliageObjects;
|
|
|
|
public void TurnOffFoliage()
|
|
{
|
|
GameObject[] array = foliageObjects;
|
|
for (int i = 0; i < array.Length; i++)
|
|
{
|
|
array[i].SetActive(value: false);
|
|
}
|
|
}
|
|
|
|
public void TurnOnFoliage()
|
|
{
|
|
GameObject[] array = foliageObjects;
|
|
for (int i = 0; i < array.Length; i++)
|
|
{
|
|
array[i].SetActive(value: true);
|
|
}
|
|
}
|
|
}
|