Class WorldTime
A simple clock component to raise current world time at runtime.
Provides some events for time milestones. Be careful using events in combination
with very high timescales. This can cause events to fire too often or be skipped entirely.
For large-scale time changes (hundreds to thousands of objects) a better performance
pattern is to simply check the DaggerfallUnity.Singleton.WorldTime.Now in Update() of each object.
See DaggerfallLight.cs for an example of reading time directly for lights on/off.
Assembly: Assembly-CSharp.dll
Syntax
public class WorldTime : MonoBehaviour
Fields
|
Improve this Doc
View Source
DaggerfallDateTime
Declaration
[HideInInspector]
public DaggerfallDateTime DaggerfallDateTime
Field Value
|
Improve this Doc
View Source
RaiseTimeInSeconds
Declaration
public float RaiseTimeInSeconds
Field Value
|
Improve this Doc
View Source
ShowDebugString
Declaration
public bool ShowDebugString
Field Value
|
Improve this Doc
View Source
TimeScale
Declaration
Field Value
Properties
|
Improve this Doc
View Source
Now
Get the current world time object.
Notes:
This is the live world time instance - any changes to this will be reflected in game world
If you just want a copy of value use Now.Clone()
Declaration
public DaggerfallDateTime Now { get; }
Property Value
Methods
|
Improve this Doc
View Source
RaiseOnCityLightsOffEvent()
Declaration
protected virtual void RaiseOnCityLightsOffEvent()
|
Improve this Doc
View Source
RaiseOnCityLightsOnEvent()
Declaration
protected virtual void RaiseOnCityLightsOnEvent()
|
Improve this Doc
View Source
RaiseOnDawnEvent()
Declaration
protected virtual void RaiseOnDawnEvent()
|
Improve this Doc
View Source
RaiseOnDuskEvent()
Declaration
protected virtual void RaiseOnDuskEvent()
|
Improve this Doc
View Source
RaiseOnMiddayEvent()
Declaration
protected virtual void RaiseOnMiddayEvent()
|
Improve this Doc
View Source
RaiseOnMidnightEvent()
Declaration
protected virtual void RaiseOnMidnightEvent()
|
Improve this Doc
View Source
RaiseOnNewDayEvent()
Declaration
protected virtual void RaiseOnNewDayEvent()
|
Improve this Doc
View Source
RaiseOnNewHourEvent()
Declaration
protected virtual void RaiseOnNewHourEvent()
|
Improve this Doc
View Source
RaiseOnNewMonthEvent()
Declaration
protected virtual void RaiseOnNewMonthEvent()
|
Improve this Doc
View Source
RaiseOnNewYearEvent()
Declaration
protected virtual void RaiseOnNewYearEvent()
Events
|
Improve this Doc
View Source
OnCityLightsOff
Declaration
public static event WorldTime.OnCityLightsOffEventHandler OnCityLightsOff
Event Type
|
Improve this Doc
View Source
OnCityLightsOn
Declaration
public static event WorldTime.OnCityLightsOnEventHandler OnCityLightsOn
Event Type
|
Improve this Doc
View Source
OnDawn
Declaration
public static event WorldTime.OnDawnEventHandler OnDawn
Event Type
|
Improve this Doc
View Source
OnDusk
Declaration
public static event WorldTime.OnDuskEventHandler OnDusk
Event Type
|
Improve this Doc
View Source
OnMidday
Declaration
public static event WorldTime.OnMiddayEventHandler OnMidday
Event Type
|
Improve this Doc
View Source
OnMidnight
Declaration
public static event WorldTime.OnMidnightEventHandler OnMidnight
Event Type
|
Improve this Doc
View Source
OnNewDay
Declaration
public static event WorldTime.OnNewDayEventHandler OnNewDay
Event Type
|
Improve this Doc
View Source
OnNewHour
Declaration
public static event WorldTime.OnNewHourEventHandler OnNewHour
Event Type
|
Improve this Doc
View Source
OnNewMonth
Declaration
public static event WorldTime.OnNewMonthEventHandler OnNewMonth
Event Type
|
Improve this Doc
View Source
OnNewYear
Declaration
public static event WorldTime.OnNewYearEventHandler OnNewYear
Event Type
Extension Methods
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)