Moai SDK  1.5 revision 1 (MoaiEdition)
MOAITimer Class Reference
Inheritance diagram for MOAITimer:
MOAINode MOAIAction MOAIInstanceEventSource MOAIInstanceEventSource MOAIEventSource MOAIEventSource MOAIAnim MOAIEaseDriver

List of all members.

Function List

  getSpeed
  getTime
  getTimesExecuted
  setCurve
  setMode
  setSpan
  setSpeed
  setTime

Function Documentation

Return the playback speed.


function getSpeed ( MOAITimer self )
Parameters:
self ( MOAITimer )
Returns:
speed ( number )

Return the current time.


function getTime ( MOAITimer self )
Parameters:
self ( MOAITimer )
Returns:
time ( number )

Gets the number of times the timer has completed a cycle.


function getTimesExecuted ( MOAITimer self )
Parameters:
self ( MOAITimer )
Returns:
nTimes ( number )

Set or clear the curve to use for event generation.


function setCurve ( MOAITimer self [, MOAIAnimCurve curve ] )
Parameters:
self ( MOAITimer )
curve ( MOAIAnimCurve ) Optional. Default value is nil.
Returns:
nil

Sets the playback mode of the timer.


function setMode ( MOAITimer self, number mode )
Parameters:
self ( MOAITimer )
mode ( number ) One of: MOAITimer.NORMAL, MOAITimer.REVERSE, MOAITimer.LOOP, MOAITimer.LOOP_REVERSE, MOAITimer.PING_PONG
Returns:
nil

Sets the playback mode of the timer.


function setSpan ( MOAITimer self, number endTime )
Parameters:
self ( MOAITimer )
endTime ( number )
Returns:
nil
Note:
Span will be 0 to endTime.

function setSpan ( MOAITimer self, number startTime, number endTime )
Parameters:
self ( MOAITimer )
startTime ( number )
endTime ( number )
Returns:
nil
Note:
Span will be startTime to endTime.

Sets the playback speed. This affects only the timer, not its children in the action tree.


function setSpeed ( MOAITimer self, number speed )
Parameters:
self ( MOAITimer )
speed ( number )
Returns:
nil

Manually set the current time. This will be wrapped into the current span.


function setTime ( MOAITimer self [, number time ] )
Parameters:
self ( MOAITimer )
time ( number ) Optional. Default value is 0.
Returns:
nil