Skip to content
ct

Class

ClockGroup

Generated GDScript class reference for CalendarTime.ClockGroup.

Status
Current
Version
v2.0
Updated
Generated from GDScript addon source

ClockGroup — internal scaffolding for save/load coordination across multiple clocks. Owned by the TimeHost (constructed in _enter_tree from the host's clocks : Array[GameClock] export); not a separately-authored .tres. Holds an Array[GameClock] and provides:

  • save_all() / load_all(data) — namespaced save/load under save_key
  • advance_all(delta_microseconds) — pump engine delta into every clock each frame (the host calls this in _process) Not a save/load target itself. "Next day" is per-clock semantics — see GameClock.advance_to_next_day. Each clock defines its own "day" via its calendar; a group operation advances every clock by elapsed time, leaving each clock's day boundary where its own calendar puts it.

Source: addons/calendar_time/game_time/state/clock_group.gd

Syntax

class ClockGroup extends RefCounted

Members

NameKindSummary
clocksPropertyThe clocks this group aggregates. Order is preserved in save/load.
save_keyPropertyThe key under which this group's clock dicts are namespaced in the save dict. Defaults to `"clocks"` so a single-group game gets correct namespacing by default. Set to a per-group unique string when you have multiple `ClockGroup`s whose save dicts might be merged.
save_allMethod
nestedProperty
first_index_by_idProperty
clockProperty
idProperty
id_strProperty
load_allMethod
nestedProperty
clocks_by_idProperty
clockProperty
advance_allMethod