Time of Day
Public Member Functions | Public Attributes | Events | List of all members
TOD_Time Class Reference

Time iteration class. More...

Public Member Functions

void RefreshTimeCurve ()
 Apply changes made to TimeCurve.
 
float ApplyTimeCurve (float deltaTime)
 Apply the time curve to a time span. More...
 
void AddHours (float hours, bool adjust=true)
 Add hours and fractions of hours to the current time. More...
 
void AddSeconds (float seconds, bool adjust=true)
 Add seconds and fractions of seconds to the current time. More...
 

Public Attributes

float DayLengthInMinutes = 30
 Length of one day in minutes.
 
bool ProgressTime = true
 Progress time at runtime.
 
bool UseDeviceDate = false
 Set the date to the current device date on start.
 
bool UseDeviceTime = false
 Set the time to the current device time on start.
 
bool UseTimeCurve = false
 Apply the time curve when progressing time.
 
AnimationCurve TimeCurve = AnimationCurve.Linear(0, 0, 24, 24)
 Time progression curve.
 

Events

Action OnSecond
 Fired whenever the second value is incremented.
 
Action OnMinute
 Fired whenever the minute value is incremented.
 
Action OnHour
 Fired whenever the hour value is incremented.
 
Action OnDay
 Fired whenever the day value is incremented.
 
Action OnMonth
 Fired whenever the month value is incremented.
 
Action OnYear
 Fired whenever the year value is incremented.
 
Action OnSunrise
 Fired whenever the sun rises.
 
Action OnSunset
 Fired whenever the sun sets.
 

Detailed Description

Time iteration class.

Component of the sky dome parent game object.

Member Function Documentation

◆ AddHours()

void TOD_Time.AddHours ( float  hours,
bool  adjust = true 
)
inline

Add hours and fractions of hours to the current time.

Parameters
hoursThe hours to add.
adjustWhether or not to apply the time curve.

◆ AddSeconds()

void TOD_Time.AddSeconds ( float  seconds,
bool  adjust = true 
)
inline

Add seconds and fractions of seconds to the current time.

Parameters
secondsThe seconds to add.
adjustWhether or not to apply the time curve.

◆ ApplyTimeCurve()

float TOD_Time.ApplyTimeCurve ( float  deltaTime)
inline

Apply the time curve to a time span.

Parameters
deltaTimeThe time span to adjust.
Returns
The adjusted time span.

The documentation for this class was generated from the following file: