timeManagerobject
The timeManager object is used to keep track of the notional game time in the OBJTIME EXTENSION.
timeManager
:
InitObject
Superclass Tree (in declaration order)
timeManager
InitObject
ModuleExecObject
` object`
Summary of Properties
additionalTime
currentTime
replacementTime
Inherited from ModuleExecObject
:
execAfterMe
execBeforeMe
hasInitialized_
isDoingExec_
isExecuted_
Summary of Methods
addInterval
advanceTime
execute
formatDate
reset
setTime
Inherited from ModuleExecObject
:
_execute
classExec
Properties
additionalTime
The number of seconds to add to the time taken on the current turn in addition to the standard time for this action.
currentTime
In case the game doesn’t specify a starting date we default to midnight on January 1st 2000.
replacementTime
If this is not nil, use this as the number of seconds taken by the current turn instead of the number computed from the action plus additionalTime.
Methods
addInterval (interval)
Adjust the currentDate by interval, where interval is specified as for the interval argument for the addInterval method of the Date class, i.e. as a list in the format [years, months, days, hours, minutes, seconds], from which trailing zeroes may be omitted.
interval may also be specified as an integer (in which case it will be taken as the number of minutes to advance) or as a BigNumber (in which case it will be taken as the number of hours).
advanceTime (secs)
Advance the time at the end of a turn (during the afterAction processing).
execute ( )
OVERRIDDEN
Initialize the timeManager.
formatDate (fmt)
Return a string containing the current date and time formatted by fmt, where fmt is one of the strings specified in the SystemManual entry for Date.
reset ( )
Reset action-dependent counts to zero for a new turn.
setTime ([args])
Set the current date and time. The possible arguments are those described for the Date constructor in the System Manual.
Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1