Game Development Reference
In-Depth Information
self.currentState_.action_:Update(deltaTimeInMillis);
elseif (status == Action.Status.TERMINATED) then
-- Evaluate all transitions to find the next
state
-- to move the FSM to.
local toStateName = EvaluateTransitions(
self,
self.transitions_[self.currentState_.name_]);
if (self.states_[toStateName] ~= nil) then
self.currentState_.action_:CleanUp();
self.currentState_ =
self.states_[toStateName];
self.currentState_.action_:Initialize();
end
end
end
end
Search WWH ::




Custom Search