![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IRunnable property interface.
This interface provides basic properties of a "runnable" object, e.g. a timeline (Start, pause, stop, rewind).
Reset the timeline. Stop the timeline, reset the WasRunning() state and call Rewind().
Boolean Reset()
Reset the timeline to a specified start time. Set the start time and call Reset().
Boolean ResetTo(Number startTime)
startTime | The start time in seconds. |
Start or continue the timeline. Does not modify the current time and loop.
Boolean Start()
Start the timeline with specified parameters. Set start/end time, calls Rewind() and Start().
Boolean Start(Number startTime, Number endTime)
startTime | The start time in seconds. |
endTime | The end time in seconds. |
Start the timeline with specified parameters. Set start/end time, number of loops, calls Rewind() and Start().
Boolean Start(Number startTime, Number endTime, Integer numberOfLoops)
startTime | The start time in seconds. |
endTime | The end time in seconds. |
numberOfLoops | Number of loops. |
Start the timeline with specified parameters. Set start/end time, loop start/end time, number of loops, calls Rewind() and Start().
Boolean Start(Number startTime, Number endTime, Number loopStartTime, Number loopEndTime, Integer numberOfLoops)
startTime | The start time in seconds. |
endTime | The end time in seconds. |
loopStartTime | The loop start time in seconds. |
loopEndTime | The loop end time in seconds. |
numberOfLoops | Number of loops. |
Pause the timeline.
Boolean Pause()
Stop the timeline. Rewind() is called if auto rewind is enabled.
Boolean Stop()
Rewind the timeline. Sets the current time to the start time and the current loop to the start loop. Does not affect the current running state.
Boolean Rewind()
Enable/disable automatic rewind. Automatic rewind is calling Rewind() when the timeline is stopped.
Boolean SetAutoRewindEnabled(Boolean enabled)
enabled | Enable automatic rewind if true. |
Check if automatic rewind is enabled.
Boolean IsAutoRewindEnabled()
Set the start time.
Boolean SetStartTime(Number startTime)
startTime | The start time in seconds. |
Get the start time.
Number GetStartTime()
Set the end time.
Boolean SetEndTime(Number endTime)
endTime | The end time in seconds. |
Get the end time.
Number GetEndTime()
Set the loop start time.
Boolean SetLoopStartTime(Number startTime)
startTime | The loop start time in seconds. |
Get the loop start time.
Number GetLoopStartTime()
Set the loop end time.
Boolean SetLoopEndTime(Number endTime)
endTime | The loop end time in seconds. |
Get the loop end time.
Number GetLoopEndTime()
Set the start loop. Loop #0 is considered the intro, if it is desired to start right in the middle of the first actual loop, the start loop should be set to 1.
Boolean SetStartLoop(Integer startLoop)
startLoop | The start loop. |
Get the start loop.
Integer GetStartLoop()
Set the number of loops.
Boolean SetNumberOfLoops(Integer numberOfLoops)
numberOfLoops | Number of loops. |
Get the number of loops.
Integer GetNumberOfLoops()
Set the time shift value.
Boolean SetTimeShift(Number timeShift)
timeShift | The time shift value. |
Get the time shift value.
Number GetTimeShift()
Set the time offset value.
Boolean SetTimeOffset(Number timeOffset)
timeOffset | The time offset value. |
Get the time offset value.
Number GetTimeOffset()
Set the time scale factor. The recent tick duration is multiplied by the time scale factor and added to the current time each logic tick. The default time scale factor is 1.
Boolean SetTimeScale(Number timeScale)
timeScale | The time scale factor. |
Get the time scale factor.
Number GetTimeScale()
Check if the timeline is running. A timeline can be started by calling Start() and stopped by calling Stop().
Boolean IsRunning()
Check if the timeline is paused. A timeline can be paused by calling Pause() and continued by calling Start().
Boolean IsPaused()
Check if the timeline is stopped. A timeline can be stopped by calling Stop() and started by calling Start().
Boolean IsStopped()
Check if the timeline was started from the beginning.
Boolean WasStarted()
Check if the timeline has stopped running. If the timeline is stopped this state is true within the current logic tick only and will be cleared at the next logic traversal.
(!) This state remains unchanged if the timeline node or a sub-tree containing the node is set to inactive within the current logic tick or if SetStopOnDeactivateEnabled() is enabled. In such a case the Reset() method can be called to clear the state.
Boolean WasRunning()
Check if the timeline is or was running. Returns (IsRunning() || WasRunning()) state.
Boolean IsOrWasRunning()
Check if the current time has passed a specified time within the most recent tick. Does not consider loops, for evaluating loops see HasPassedLoop().
Boolean HasPassedTime(Number time)
time | The time to check in seconds. |
Check if the current loop has passed a specified loop number within the most recent tick. If the loop number to check is negative, true is returned each time the current loop has changed.
Boolean HasPassedLoop(Integer loop)
loop | The loop number to check. |
Get the recent time.
Number GetRecentTime()
Get the current time. This method does not consider loops, for evaluating loops see GetCurrentLoop().
Number GetCurrentTime()
Get the remaining time. This method calculates GetEndTime() - GetCurrentTime() which does not consider loops, for evaluating loops see GetCurrentLoop().
Number GetRemainingTime()
Set the current time. This method does not consider loops, for setting loops see SetCurrentLoop().
SetCurrentTime(Number time)
time | The current time to set in seconds. |
Get the recent loop.
Integer GetRecentLoop()
Get the current loop. The current loop provides the following information for n loops:
Integer GetCurrentLoop()
Get the remaining loops. Calculates GetNumberOfLoops() - GetCurrentLoop().
Integer GetRemainingLoops()
Set the current loop. The current loop represents the following information for n loops:
Boolean SetCurrentLoop(Integer loop)
loop | The current loop to set. |
Get the recent animation state.
Murl.IEnums.AnimationState GetRecentState()
Get the current animation state.
Murl.IEnums.AnimationState GetCurrentState()