Edit

WorldClock Class

A class that represents a particular clock within a world.

Properties

isPaused

isPaused: boolean;

Retrieves or sets whether the world clock is currently paused.

Type: boolean

Notes:

  • This property can't be edited in restricted-execution mode.

name

read-only name: string;

The identifier that represents this world clock.

Type: string

time

time: number;

Retrieves or sets the current time (in ticks) of the world clock.

Type: number

Notes:

  • This property has a minimum bound of 0
  • This property can't be edited in restricted-execution mode.

timeMarkers

read-only timeMarkers: TimeMarker[];

Retrieves the current time markers of the world clock.

Type: TimeMarker[]

Methods

addTimeMarker

addTimeMarker(timeMarkerOptions: TimeMarkerOptions): void

Adds a new time marker to the world clock.

Parameters

Notes:

removeTimeMarker

removeTimeMarker(timeMarker: string | TimeMarker): void

Removes an existing time marker from the world clock.

Parameters

  • timeMarker: string | TimeMarker

    The time marker or time marker name to remove.

Notes:

rewindTo

rewindTo(timeMarker: string | TimeMarker): void

Rewinds the world clock's time to the previous occurrence of the specified time marker.

Parameters

  • timeMarker: string | TimeMarker

    The time marker or time marker name to rewind the world clock's time to.

Notes:

set

set(timeMarker: string | TimeMarker): void

Sets the world clock's time to the specified time marker.

Parameters

  • timeMarker: string | TimeMarker

    The time marker or time marker name to set the world clock's time to.

Notes:

skipTo

skipTo(timeMarker: string | TimeMarker): void

Skips the world clock's time to the next occurrence of the specified time marker.

If the next occurrence overflows the world clock's time, the time is reset to the first occurrence.

Parameters

  • timeMarker: string | TimeMarker

    The time marker or time marker name to skip the world clock's time to.

Notes: