Derives time-of-day transitions from a clock and emits time_of_day_changed / day_night_transition_progress_changed on its bus. Instantiated by TimeHost per clock. Reads times_of_day from clock.calendar: the calendar is the schema and clocks inherit its times_of_day, so this service does not own a list.
Source: addons/calendar_time/day_night_cycle/service/day_night_cycle_service.gd
Syntax
class DayNightCycleService extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
DayNightCycleServiceLogic | Field | Cycle math for the day-night service. |
ClockValidator | Field | Validates the bound clock. |
clock | Property | Clock whose date and time drive the day-night cycle. Set by the host. |
time_of_day | Property | Current time-of-day; `null` when unbound or the calendar has no TODs. |
last_time_of_day | Property | Most recently entered stage, used to detect transitions. |
transition_progress | Property | Progress through the active time-of-day lighting transition. |
reset | Method | |
get_previous_time_of_day | Method | |
calculate_time_of_day | Method | |
calculate_time_of_day_with_hours_time | Method | |
get_last_enter_time | Method | |
validate | Method |