Game Development Reference
In-Depth Information
Initializing an action
Initializing an action begins by calling the action's initialize callback and then immediately
sets the action into a running state. This transitions the action into a standard update loop
that is moving forward:
Action.lua :
function Action.Initialize(self)
-- Run the initialize function if one is specified.
if (self.status_ == Action.Status.UNINITIALIZED) then
if (self.initializeFunction_) then
self.initializeFunction_(self.userData_);
end
end
-- Set the action to running after initializing.
self.status_ = Action.Status.RUNNING;
end
Search WWH ::




Custom Search