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

The IAppProcessor interface.

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


Table members

Functions


Murl.Logic.IAppProcessor.new(callbackTable)

Create a callback object with a given callback table.

Example of a callback table:

local myIAppProcessor =
{
OnInit = function (self, state)
-- user code
return true
end,
OnDeInit = function (self, state)
-- user code
return true
end,
OnProcessTick = function (self, state)
-- user code
end,
OnProcessTickChildren = function (self, state)
-- user code
end,
OnProcessFrame = function (self, state)
-- user code
end,
OnProcessFrameChildren = function (self, state)
-- user code
end,
OnFinishTick = function (self, state)
-- user code
end,
OnFinishTickChildren = function (self, state)
-- user code
end,
OnFinishFrame = function (self, state)
-- user code
end,
OnFinishFrameChildren = function (self, state)
-- user code
end,
OnPackageWillBeLoaded = function (self, state, package)
-- user code
end,
OnPackageWasLoaded = function (self, state, package)
-- user code
end,
OnPackageFailedLoading = function (self, state, package)
-- user code
end,
OnPackageWillBeUnloaded = function (self, state, package)
-- user code
end,
OnPackageWasUnloaded = function (self, state, package)
-- user code
end,
OnPackageFailedUnloading = function (self, state, package)
-- user code
end,
OnRunStateChanged = function (self, state, currentState, previousState)
-- user code
end,
OnSetEnabled = function (self, isEnabled)
-- user code
end,
}
return Murl.Logic.IAppProcessor.new(myIAppProcessor)

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

Murl.Logic.IAppProcessor new(Table callbackTable)

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


Methods


OnInit(state)

Called by IProcessor at initialization.

Boolean OnInit(Murl.Logic.IState state)

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

OnDeInit(state)

Called by IProcessor at deinitialization.

Boolean OnDeInit(Murl.Logic.IState state)

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

OnProcessTick(state)

Called by IProcessor each logic tick if enabled.

OnProcessTick(Murl.Logic.IState state)

Parameters
stateThe IState object.

OnProcessTickChildren(state)

Called by IProcessor after processing children's OnProcessTick() each logic tick if enabled.

OnProcessTickChildren(Murl.Logic.IState state)

Parameters
stateThe IState object.

OnProcessFrame(state)

Called by IProcessor each frame tick if enabled.

OnProcessFrame(Murl.Logic.IState state)

Parameters
stateThe IState object.

OnProcessFrameChildren(state)

Called by IProcessor after processing children's OnProcessFrame() each frame tick if enabled.

OnProcessFrameChildren(Murl.Logic.IState state)

Parameters
stateThe IState object.

OnFinishTick(state)

Called by IProcessor each logic tick if enabled.

OnFinishTick(Murl.Logic.IState state)

Parameters
stateThe IState object.

OnFinishTickChildren(state)

Called by IProcessor after processing children's OnFinishTick() each logic tick if enabled.

OnFinishTickChildren(Murl.Logic.IState state)

Parameters
stateThe IState object.

OnFinishFrame(state)

Called by IProcessor each frame tick if enabled.

OnFinishFrame(Murl.Logic.IState state)

Parameters
stateThe IState object.

OnFinishFrameChildren(state)

Called by IProcessor after processing children's OnFinishFrame() each frame tick if enabled.

OnFinishFrameChildren(Murl.Logic.IState state)

Parameters
stateThe IState object.

OnPackageWillBeLoaded(state, package)

Called by IProcessor to report the beginning of package loading.

OnPackageWillBeLoaded(Murl.Logic.IState state, Murl.IPackage package)

Parameters
stateThe IState object.
packageThe package to load.

OnPackageWasLoaded(state, package)

Called by IProcessor to report the succesful loading of a package.

OnPackageWasLoaded(Murl.Logic.IState state, Murl.IPackage package)

Parameters
stateThe IState object.
packageThe package to load.

OnPackageFailedLoading(state, package)

Called by IProcessor to report failed loading a package.

OnPackageFailedLoading(Murl.Logic.IState state, Murl.IPackage package)

Parameters
stateThe IState object.
packageThe package to load.

OnPackageWillBeUnloaded(state, package)

Called by IProcessor to report the beginning of package unloading.

OnPackageWillBeUnloaded(Murl.Logic.IState state, Murl.IPackage package)

Parameters
stateThe IState object.
packageThe package to load.

OnPackageWasUnloaded(state, package)

Called by IProcessor to report the succesful unloading of a package.

OnPackageWasUnloaded(Murl.Logic.IState state, Murl.IPackage package)

Parameters
stateThe IState object.
packageThe package to load.

OnPackageFailedUnloading(state, package)

Called by IProcessor to report failed unloading a package.

OnPackageFailedUnloading(Murl.Logic.IState state, Murl.IPackage package)

Parameters
stateThe IState object.
packageThe package to load.

OnRunStateChanged(state, currentState, previousState)

Called by IProcessor to report a change of the application run state.

OnRunStateChanged(Murl.Logic.IState state, Murl.IEnums.AppRunState currentState, Murl.IEnums.AppRunState previousState)

Parameters
stateThe IState object.
currentStateThe current run state.
previousStateThe previous run state.

OnSetEnabled(isEnabled)

Called by IProcessor::SetEnabled(). This method is used to track the enabled state.

OnSetEnabled(Boolean isEnabled)

Parameters
isEnabledtrue if enabled.