Mister_Nebula 5bb2784c4f fix???
2020-08-14 21:33:37 +01:00

39 lines
804 B
C#

using UnityEngine;
namespace QSB.Tools
{
public class QSBProbe : MonoBehaviour
{
public void SetState(bool state)
{
if (state)
{
Activate();
}
else
{
Deactivate();
}
}
private void Activate()
{
var renderers = gameObject.GetComponentsInChildren<MeshRenderer>();
foreach (var item in renderers)
{
item.enabled = true;
}
}
private void Deactivate()
{
var renderers = gameObject.GetComponentsInChildren<MeshRenderer>();
foreach (var item in renderers)
{
item.enabled = false;
}
}
}
}