Game Development Reference
In-Depth Information
Transitions
Transitions are represented in the same way with a Lua table and some basic information
on how two animation states will blend together. The information we need to keep is the
blend curve, blend-in window offset, blend-out window offset, and the duration of the an-
imation blend.
Note
You can find the topic's implementation of an animation state in the src/
demo_framework/script/AnimationTransition.lua file.
Laying out the AnimationTransition class will create an initialization function
which assigns default values for each instance of AnimationTransition .
Sandbox.lua :
AnimationTransition = {};
function AnimationTransition.new()
local transition = {};
transition.blendCurve_ = "linear";
transition.blendInWindow_ = 0;
transition.blendOutWindow_ = 0;
transition.duration_ = 0.2;
return transition;
end
Search WWH ::




Custom Search