Game Development Reference
In-Depth Information
InitializeAnimation(self.nextState_.animation_);
self.currentState_ = self.nextState_;
self.nextState_ = nil;
HandleCallbacks(self,
self.nextState_.name_);
end
else
if ((currentAnimTime + deltaTimeInSeconds) >=
currentAnimLength) then
ClearAnimation(self.currentState_.animation_);
InitializeAnimation(self.nextState_.animation_);
self.currentState_ = self.nextState_;
self.nextState_ = nil;
HandleCallbacks(self,
self.currentState_.name_);
end
end
end
-- Step animations that are currently playing.
if (self.currentTransition_) then
...
elseif (self.currentState_) then
local currentAnimTime =
Animation.GetTime(self.currentState_.animation_);
local currentAnimLength =
Animation.GetLength(self.currentState_.animation_);
local deltaTime =
Search WWH ::




Custom Search