Game Development Reference
In-Depth Information
soldier, "stand_melee_1_with_weapon");
Animation.SetLooping(meleeAnimation, false);
Animation.SetEnabled(meleeAnimation, false);
end
function Sandbox_Update(sandbox, deltaTimeInMillis)
if (Animation.GetNormalizedTime(meleeAnimation) >= 1)
then
Animation.SetEnabled(idleAnimation, true);
Animation.Reset(idleAnimation);
Animation.SetEnabled(meleeAnimation, false);
end
if (Animation.IsEnabled(meleeAnimation)) then
Animation.StepAnimation(
meleeAnimation, deltaTimeInMillis);
else
Animation.StepAnimation(idleAnimation,
deltaTimeInMillis);
end
end
Search WWH ::




Custom Search