mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
#region
|
|
|
|
using UnityEngine;
|
|
|
|
#endregion
|
|
|
|
namespace NewHorizons.Components
|
|
{
|
|
public class StarController : MonoBehaviour
|
|
{
|
|
public Light Light;
|
|
public Light AmbientLight;
|
|
public FaceActiveCamera FaceActiveCamera;
|
|
public CSMTextureCacher CSMTextureCacher;
|
|
public ProxyShadowLight ProxyShadowLight;
|
|
public float Intensity;
|
|
public Color SunColor;
|
|
|
|
public void Awake()
|
|
{
|
|
Disable();
|
|
}
|
|
|
|
public void Disable()
|
|
{
|
|
if (FaceActiveCamera != null) FaceActiveCamera.enabled = false;
|
|
if (CSMTextureCacher != null) CSMTextureCacher.enabled = false;
|
|
if (ProxyShadowLight != null) ProxyShadowLight.enabled = false;
|
|
}
|
|
|
|
public void Enable()
|
|
{
|
|
if (FaceActiveCamera != null) FaceActiveCamera.enabled = true;
|
|
if (CSMTextureCacher != null) CSMTextureCacher.enabled = true;
|
|
if (ProxyShadowLight != null) ProxyShadowLight.enabled = true;
|
|
}
|
|
}
|
|
} |