rise-and-swine/Assets/Scripts/Assembly-CSharp/AlienPointLight.cs
2023-02-25 23:04:03 -05:00

19 lines
448 B
C#

public class AlienPointLight : PointLight
{
private void OnDestroy()
{
if (LightManager.Instance && LightManager.Instance.NightVisionOn)
{
LightManager.Instance.ToggleNightVision();
}
}
protected override void OnTouch()
{
base.OnTouch();
if (!base.contraption.HasNightVision && LightManager.Instance != null && (this.activated ^ LightManager.Instance.NightVisionOn))
{
LightManager.Instance.ToggleNightVision();
}
}
}