simple eating )
This commit is contained in:
@@ -8,8 +8,8 @@ public class TimeManager : MonoBehaviour
|
||||
[SerializeField]
|
||||
private float _startHour;
|
||||
|
||||
[SerializeField]
|
||||
private Light _sunLight;
|
||||
//[SerializeField]
|
||||
//private Light _sunLight;
|
||||
|
||||
[SerializeField]
|
||||
private float _sunriseHour;
|
||||
@@ -31,7 +31,7 @@ public class TimeManager : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_sunInitialIntensity = _sunLight.intensity;
|
||||
// _sunInitialIntensity = _sunLight.intensity;
|
||||
_timer = _minuteToRealTime;
|
||||
_currentTime = TimeSpan.Zero + TimeSpan.FromHours(_startHour);
|
||||
_sunriseTime = TimeSpan.FromHours(_sunriseHour);
|
||||
@@ -61,7 +61,7 @@ public class TimeManager : MonoBehaviour
|
||||
{
|
||||
float intensityMultiplier = 1;
|
||||
float timeofDay = (float)(CurrentTime.TotalDays - CurrentTime.Days);
|
||||
_sunLight.transform.localRotation = Quaternion.Euler((timeofDay * 360f) - 90, 170, 0);
|
||||
//_sunLight.transform.localRotation = Quaternion.Euler((timeofDay * 360f) - 90, 170, 0);
|
||||
if (timeofDay > _sunriseTime.TotalDays && timeofDay < _sunsetTime.TotalDays)
|
||||
{
|
||||
if (timeofDay <= _sunsetTime.TotalDays)
|
||||
@@ -73,7 +73,7 @@ public class TimeManager : MonoBehaviour
|
||||
{
|
||||
intensityMultiplier = 0;
|
||||
}
|
||||
_sunLight.intensity = _sunInitialIntensity * intensityMultiplier;
|
||||
// _sunLight.intensity = _sunInitialIntensity * intensityMultiplier;
|
||||
}
|
||||
|
||||
private TimeSpan CalculateTimeDifference(TimeSpan from, TimeSpan to)
|
||||
|
||||
Reference in New Issue
Block a user