Class managing the ingame world events like Earthquakes, Rats invasion or Volcano eruptions.

Variables

read onlyduration:Float

The duration of the current event, or the previous one if there is no event active.

read onlykind:EventKind

The scheduled or current event kind. Is null if no event is scheduled.

read onlystart:Float

The start time of the current event, or the previous one if there is no event active.

Methods

getCurrent():EventKind

Return the currently active event (Bloodmoon, Kraken Attack), or null if no event is currenly active.

Returns:

EventKind

getEndTime():Float

Get the time at which the current event ends. Return -1 if there is no event active.

Returns:

Float

setEvent(kind:EventKind, ?startIn:Float):Void

[HostOnly] Schedule an event. Will replace any existing event already schedule.

Parameters:

kind

The kind of event

[Optional]

startIn The delay before the event start, in month. Will use the event's default delay by default. Use 0 to start immediately.

Returns:

Void