Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/EnviroReflections.cs
2026-02-21 16:45:37 +08:00

33 lines
537 B
C#

using UnityEngine;
public class EnviroReflections : MonoBehaviour
{
public ReflectionProbe probe;
public float ReflectionUpdateInGameHours = 1f;
private float lastUpdate;
private void Start()
{
if (probe == null)
{
probe = GetComponent<ReflectionProbe>();
}
}
private void UpdateProbe()
{
probe.RenderProbe();
lastUpdate = EnviroSky.instance.currentTimeInHours;
}
private void Update()
{
if (EnviroSky.instance.currentTimeInHours > lastUpdate + ReflectionUpdateInGameHours)
{
UpdateProbe();
}
}
}