public override void Update()
{
relativePosition = new Vector3(235, 885, 0);
if (sunControl != null)
{
if (sunControl.DayNightEnabled)
{
float tod = sunControl.TimeOfDay;
int hour = (int)Math.Floor(tod);
int minute = (int)Math.Floor((tod - hour) * 60.0f);
timeOfDay.text = String.Format("{0,2:00}:{1,2:00}", hour, minute);
if (!pauseUpdates)
{
timeSlider.value = sunControl.TimeOfDay;
}
float fade = Math.Abs(sunControl.TimeOfDay - 12.0f) / 12.0f;
((UISprite)timeSlider.thumbObject).color = Color32.Lerp(sunColor, moonColor, fade);
}
else
{
timeOfDay.text = i18n.current["night_disabled"];
}
}
base.Update();
}