Show / Hide Table of Contents

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.

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
WorldTime
Namespace: DaggerfallWorkshop
Assembly: Assembly-CSharp.dll
Syntax
public class WorldTime : MonoBehaviour

Fields

| Improve this Doc View Source

DaggerfallDateTime

Declaration
[HideInInspector]
public DaggerfallDateTime DaggerfallDateTime
Field Value
Type Description
DaggerfallDateTime
| Improve this Doc View Source

RaiseTimeInSeconds

Declaration
public float RaiseTimeInSeconds
Field Value
Type Description
Single
| Improve this Doc View Source

ShowDebugString

Declaration
public bool ShowDebugString
Field Value
Type Description
Boolean
| Improve this Doc View Source

TimeScale

Declaration
public float TimeScale
Field Value
Type Description
Single

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
Type Description
DaggerfallDateTime

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
Type Description
WorldTime.OnCityLightsOffEventHandler
| Improve this Doc View Source

OnCityLightsOn

Declaration
public static event WorldTime.OnCityLightsOnEventHandler OnCityLightsOn
Event Type
Type Description
WorldTime.OnCityLightsOnEventHandler
| Improve this Doc View Source

OnDawn

Declaration
public static event WorldTime.OnDawnEventHandler OnDawn
Event Type
Type Description
WorldTime.OnDawnEventHandler
| Improve this Doc View Source

OnDusk

Declaration
public static event WorldTime.OnDuskEventHandler OnDusk
Event Type
Type Description
WorldTime.OnDuskEventHandler
| Improve this Doc View Source

OnMidday

Declaration
public static event WorldTime.OnMiddayEventHandler OnMidday
Event Type
Type Description
WorldTime.OnMiddayEventHandler
| Improve this Doc View Source

OnMidnight

Declaration
public static event WorldTime.OnMidnightEventHandler OnMidnight
Event Type
Type Description
WorldTime.OnMidnightEventHandler
| Improve this Doc View Source

OnNewDay

Declaration
public static event WorldTime.OnNewDayEventHandler OnNewDay
Event Type
Type Description
WorldTime.OnNewDayEventHandler
| Improve this Doc View Source

OnNewHour

Declaration
public static event WorldTime.OnNewHourEventHandler OnNewHour
Event Type
Type Description
WorldTime.OnNewHourEventHandler
| Improve this Doc View Source

OnNewMonth

Declaration
public static event WorldTime.OnNewMonthEventHandler OnNewMonth
Event Type
Type Description
WorldTime.OnNewMonthEventHandler
| Improve this Doc View Source

OnNewYear

Declaration
public static event WorldTime.OnNewYearEventHandler OnNewYear
Event Type
Type Description
WorldTime.OnNewYearEventHandler

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX