rise-and-swine/Assets/Scripts/Assembly-CSharp/AlienPointLight.cs

20 lines
448 B
C#
Raw Normal View History

2023-02-25 23:04:03 -05:00
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();
}
}
}