clockManagerobject | subtime.t[29] |
Superclass Tree | Property Summary | Method Summary | Property Details | Method Details |
clockManager : PreinitObject
clockManager
PreinitObject
ModuleExecObject
object
baseDate
baseScaleFactor
curTime
eventList
lastEvent
nextEvent
nextTime
scaleFactor
turnLastCommitted
Inherited from PreinitObject
:
execBeforeMe
reverseGlobalSymbols
Inherited from ModuleExecObject
:
execAfterMe
hasInitialized_
isDoingExec_
isExecuted_
checkTime
checkTimeFmt
eventDate
eventReached
execute
formatTime
getClockTime
lastEventDate
reachCheck
slowDownTime
syncTime
Inherited from ModuleExecObject
:
_execute
classExec
baseDate | subtime.t[443] |
baseScaleFactor | subtime.t[201] |
In Mike Roberts's implementation, the baseScaleFactor was defined as a constant value of 60. This is still the default value, but if there is a next event we take the scale factor from that event's scaleFactor so that we can vary the pace of time according to the spacing of events if we wish.
curTime | subtime.t[416] |
eventList | subtime.t[413] |
lastEvent | subtime.t[419] |
nextEvent | subtime.t[425] |
nextTime | subtime.t[422] |
scaleFactor | subtime.t[208] |
turnLastCommitted | subtime.t[435] |
checkTime ( ) | subtime.t[49] |
Remember that our time-keeping scheme is a sort of "Schrodinger's clock" [see footnote 1]. Between time checks, the game time clock is in a vague, fuzzy state, drifting along at an indeterminate pace from the most recent check. When this method is called, though, the clock manager is forced to commit to a particular time, because we have to give a specific answer to the question we're being asked ("what time is it?"). As in quantum mechanics, then, the act of observation affects the quantity being observed. Therefore, you should avoid calling this routine unnecessarily; call it only when you actually have to tell the player what time it is - and don't tell the player what time it is unless they ask, or there's some other good reason.
If you want a string-formatted version of the time (as in '9:05pm'), you can call checkTimeFmt().
checkTimeFmt (fmt) | subtime.t[220] |
Note that the same cautions for checkTime() apply here - calling this routine commits us to a particular time, so you should call this routine only when you're actually ready to display a time to the player.
eventDate (t) | subtime.t[446] |
eventReached (evt) | subtime.t[326] |
execute ( ) OVERRIDDEN | subtime.t[247] |
formatTime (t, fmt) | subtime.t[233] |
The format string (fmt) is specified in the same way as for the formatDate() method of the Date class (for which see the TADS 3 System Manual).
getClockTime (dat) | subtime.t[478] |
lastEventDate ( ) | subtime.t[472] |
reachCheck ( ) | subtime.t[384] |
slowDownTime ( ) | subtime.t[170] |
syncTime (t) | subtime.t[496] |