Game Development Reference
In-Depth Information
Action cleanup
Terminating an action is very similar to initializing an action, and it sets the status of the
action to uninitialized once the cleanup callback has an opportunity to finish any process-
ing of the action.
Note
If a cleanup callback function isn't defined, the action will immediately move to an unini-
tialized state upon cleanup.
During action cleanup, we'll check to make sure the action has fully terminated, and then
run a cleanup function if one is specified.
Action.lua :
function Action.CleanUp(self)
if (self.status_ == Action.Status.TERMINATED) then
if (self.cleanUpFunction_) then
self.cleanUpFunction_(self.userData_);
end
end
self.status_ = Action.Status.UNINITIALIZED;
end
Search WWH ::




Custom Search