![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IStage interface.
The IStage is an extended IProcessor containing a run state and an optional IStageTimeline object. An IStage object is controlled by the IStageProcessor.
Additional IProcessor objects can be added to the IStageProcessor object by using myStageProc->GetProcessor(myStageProc)->AddChild(). See also enum StageProcessing.
Definiton of the stage processsing sequence. The sequence of calling the IAppStage callbacks and the IAppProcessor callbacks can be controlled.
Murl.Logic.IStage.BEFORE_STEP | Default, process stage before processor. - IAppStage::OnProcessStageTick() or OnProcessStageFrame(). - IAppStage::OnProcessTick[RUN_STATE_STATE]. - IAppProcessor::OnProcessTick() or OnProcessFrame(). - IAppProcessor::OnProcessTickChildren() or OnProcessFrameChildren(). |
Murl.Logic.IStage.BEFORE_CHILDREN | Process stage in between processor. - IAppProcessor::OnProcessTick() or OnProcessFrame(). - IAppStage::OnProcessStageTick() or OnProcessStageFrame(). - IAppStage::OnProcessTick[RUN_STATE_STATE]. - IAppProcessor::OnProcessTickChildren() or OnProcessFrameChildren(). |
Murl.Logic.IStage.AFTER_CHILDREN | Process stage after processor. - IAppProcessor::OnProcessTick() or OnProcessFrame(). - IAppProcessor::OnProcessTickChildren() or OnProcessFrameChildren(). - IAppStage::OnProcessStageTick() or OnProcessStageFrame(). - IAppStage::OnProcessTick[RUN_STATE_STATE]. |
Definition of RunStates controlled by the IStageProcessor.
Murl.Logic.IStage.RUN_STATE_STOP | The idle state. - No IAppStage and IAppProcessor callbacks are processed. |
Murl.Logic.IStage.RUN_STATE_BEGIN_INTRO | The begin intro state. - If the IStageProcessor switch is set, set the switch to the stage's switch identifier. - If the IStageTimeline is set, execute IStageTimeline::StartIntro(). - Call IAppStage::OnProcessStageTickBeginIntro(). - Switch to RUN_STATE_RUN_INTRO if run state is unchanged. |
Murl.Logic.IStage.RUN_STATE_RUN_INTRO | The run intro state. - Call IAppStage::OnProcessStageTickRunIntro(). - If the IStageTimeline is set and not running, switch to RUN_STATE_BEGIN_RUN if run state is unchanged. |
Murl.Logic.IStage.RUN_STATE_BEGIN_RUN | The begin run state. - Call IAppStage::OnProcessStageTickBeginRun(). - Switch to RUN_STATE_RUN if run state is unchanged. |
Murl.Logic.IStage.RUN_STATE_RUN | The run state. - Call IAppStage::OnProcessStageTickRun(). |
Murl.Logic.IStage.RUN_STATE_BEGIN_OUTRO | The begin outro state. - If the IStageTimeline is set, execute IStageTimeline::StartOutro(). - Call IAppStage::OnProcessStageTickBeginOutro(). - Switch to RUN_STATE_RUN_OUTRO if run state is unchanged. |
Murl.Logic.IStage.RUN_STATE_RUN_OUTRO | The run outro state. - Call IAppStage::OnProcessStageTickRunOutro(). - If the IStageTimeline is set and not running, switch to RUN_STATE_STOP and call IAppStage::OnProcessStageTickStop() if run state is unchanged. |
Get the processor interface from a stage object. The IStage conforms to the IProcessor interface.
Murl.SharedPointer.LogicIProcessor GetProcessor()
Set the stage processing sequence.
SetStageProcessing(Murl.Logic.IStage.StageProcessing processing)
processing | The stage processing sequence. |
Get the stage processing sequence.
Murl.Logic.IStage.StageProcessing GetStageProcessing()
Set the stage callback object.
Boolean SetAppStage(Murl.SharedPointer.LogicIAppStage appStage)
appStage | The stage callback object. |
Set the stage identifier. The stage identifier is used by the IStageProcessor to select stages by string identifier.
SetStageId(String stageId)
stageId | The stage identifier. |
Get the stage identifier.
String GetStageId()
Set the graph switch child identifier. See IStageProcessor description.
SetSwitchId(String switchId)
switchId | The graph switch child identifier. |
Get the graph switch child identifier.
String GetSwitchId()
Set the current run state.
SetRunState(Murl.Logic.IStage.RunState runState)
runState | The run state to set. |
Check the current run state.
Boolean IsRunState(Murl.Logic.IStage.RunState runState)
runState | The run state to compare. |
Get the current run state.
Murl.Logic.IStage.RunState GetRunState()
Start a stage intro. If the current run state is RUN_STATE_STOP, set the RUN_STATE_BEGIN_INTRO.
Boolean StartStageIntro()
Start a stage intro. If the current run state is not RUN_STATE_STOP, set the RUN_STATE_BEGIN_OUTRO.
Boolean StartStageOutro()
Stop the stage. If the current run state is not RUN_STATE_STOP, set the RUN_STATE_STOP.
(!) IAppStage::OnStop() is not executed.
Boolean StopStage()
Check if stage is stopped.
Boolean IsStageStopped()
Create and initialize the IStageTimeline object. The IStageTimeline object created is deinitialized and destroyed automatically by DeInitStage().
The intro start time is set to zero, the outro start time is set to the intro end time by default. The intro / outro time can be modified at any time by accessing the IStageTimeline object using GetStageTimeline().
Boolean CreateStageTimeline(Murl.Logic.IState state, String timeline, Number introTime, Number outroTime)
state | The IState object. |
timeline | The full path to the graph <Timeline> instance. |
introTime | The intro end time in seconds, |
outroTime | The outro end time in seconds, |
Set the IStageTimeline object. The IStageTimeline object is not affected by DeInitStage().
Boolean SetStageTimeline(Murl.SharedPointer.LogicIStageTimeline stageTimeline)
stageTimeline | An initialized IStageTimeline object. |
Get the IStageTimeline object.
Murl.SharedPointer.LogicIStageTimeline GetStageTimeline()
Initialize the stage. This method is typically used by the corresponding IStageProcessor. Execute IAppProcessor::OnInit(), IAppStage::OnInitStage() and initialization of all processor's children.
Boolean InitStage(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Deinitialize the stage. This method is typically used by the corresponding IStageProcessor. Execute deinitialization of all processor's children, AppStage::OnDeInitStage() and IAppProcessor::OnDeInit().
Boolean DeInitStage(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Execute a logic tick. This method is typically used by the corresponding IStageProcessor.
Evaluate the StageProcessing state to execute the IProcessor logic tick and the ProcessStageTickSelf() method.
ProcessStageTick(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Execute a frame tick. This method is typically used by the corresponding IStageProcessor.
Evaluate the StageProcessing state to execute the IProcessor frame tick and the ProcessStageFrameSelf() method.
ProcessStageFrame(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Finish a logic tick. This method is typically used by the corresponding IStageProcessor.
FinishStageTick(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Finish a frame tick. This method is typically used by the corresponding IStageProcessor.
FinishStageFrame(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Execute a IAppStage logic tick. This method is typically used by IStage::ProcessStageTick() method.
Execute the IAppStage::OnProcessStageTick() method first and afterwards the IAppStage::OnProcessTick[RUN_STATE_STATE] method depending on the current RunState.
ProcessStageTickSelf(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Execute a IAppStage frame tick. This method is typically used by IStage::ProcessStageFrame() method.
Execute the IAppStage::OnProcessStageFrame() method.
ProcessStageFrameSelf(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Finish a IAppStage logic tick. This method is typically used by IStage::ProcessStageTick() method.
FinishStageTickSelf(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |
Finish a IAppStage frame tick. This method is typically used by IStage::ProcessStageFrame() method.
FinishStageFrameSelf(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)
state | The IState object. |
stageProcessor | The corresponding IStageProcessor object. |