Murl Engine Lua Addon API  Version 1.0 beta
Murl.Logic.IAppStage

The IAppStage interface.

This interface is used by the IStage object to callback the app.


Table members

Functions


Murl.Logic.IAppStage.new(callbackTable)

Create a callback object with a given callback table.

Example of a callback table:

local myIAppStage =
{
OnInitStage = function (self, state, stageProcessor)
-- user code
return true
end,
OnDeInitStage = function (self, state, stageProcessor)
-- user code
return true
end,
OnProcessStageTickBeginIntro = function (self, state, stageProcessor)
-- user code
end,
OnProcessStageTickRunIntro = function (self, state, stageProcessor)
-- user code
end,
OnProcessStageTickBeginRun = function (self, state, stageProcessor)
-- user code
end,
OnProcessStageTickRun = function (self, state, stageProcessor)
-- user code
end,
OnProcessStageTickBeginOutro = function (self, state, stageProcessor)
-- user code
end,
OnProcessStageTickRunOutro = function (self, state, stageProcessor)
-- user code
end,
OnProcessStageTickStop = function (self, state, stageProcessor)
-- user code
end,
OnProcessStageTick = function (self, state, stageProcessor)
-- user code
end,
OnProcessStageFrame = function (self, state, stageProcessor)
-- user code
end,
OnFinishStageTick = function (self, state, stageProcessor)
-- user code
end,
OnFinishStageFrame = function (self, state, stageProcessor)
-- user code
end,
}
return Murl.Logic.IAppStage.new(myIAppStage)

Is is allowed to omit unused callback functions and to add user specific fields to the table.

Murl.Logic.IAppStage new(Table callbackTable)

Parameters
callbackTableA table containing the methods to callback.
Returns
Murl.Logic.IAppStage The created calback object.


Methods


OnInitStage(state, stageProcessor)

Called by IStage::InitStage().

Boolean OnInitStage(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.
Returns
Boolean true if successful, should return false if any initialization failed.

OnDeInitStage(state, stageProcessor)

Called by IStage::DeInitStage().

Boolean OnDeInitStage(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.
Returns
Boolean true if successful, should return false if any deinitialization failed.

OnProcessStageTickBeginIntro(state, stageProcessor)

Called by IStage::ProcessStageTickSelf() for IStage::RUN_STATE_BEGIN_INTRO.

OnProcessStageTickBeginIntro(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnProcessStageTickRunIntro(state, stageProcessor)

Called by IStage::ProcessStageTickSelf() for IStage::RUN_STATE_RUN_INTRO.

OnProcessStageTickRunIntro(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnProcessStageTickBeginRun(state, stageProcessor)

Called by IStage::ProcessStageTickSelf() for IStage::RUN_STATE_BEGIN_RUN.

OnProcessStageTickBeginRun(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnProcessStageTickRun(state, stageProcessor)

Called by IStage::ProcessStageTickSelf() for IStage::RUN_STATE_RUN.

OnProcessStageTickRun(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnProcessStageTickBeginOutro(state, stageProcessor)

Called by IStage::ProcessStageTickSelf() for IStage::RUN_STATE_BEGIN_OUTRO.

OnProcessStageTickBeginOutro(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnProcessStageTickRunOutro(state, stageProcessor)

Called by IStage::ProcessStageTickSelf() for IStage::RUN_STATE_RUN_OUTRO.

OnProcessStageTickRunOutro(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnProcessStageTickStop(state, stageProcessor)

Called by IStage::ProcessStageTickSelf() at finish of IStage::RUN_STATE_RUN_OUTRO.

OnProcessStageTickStop(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnProcessStageTick(state, stageProcessor)

Called by IStage::ProcessStageTickSelf().

OnProcessStageTick(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnProcessStageFrame(state, stageProcessor)

Called by IStage::ProcessStageFrameSelf().

OnProcessStageFrame(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnFinishStageTick(state, stageProcessor)

Called by IStage::FinishStageTickSelf().

OnFinishStageTick(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

OnFinishStageFrame(state, stageProcessor)

Called by IStage::FinishStageFrameSelf().

OnFinishStageFrame(Murl.Logic.IState state, Murl.Logic.IStageProcessor stageProcessor)

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.