Completed the play-seq animation command for characters
This commit is contained in:
@@ -53,6 +53,23 @@ void UlxScriptedAnimations::AddAnimation(
|
||||
Animations.Insert(Result, 0);
|
||||
}
|
||||
|
||||
double UlxScriptedAnimations::CalculateTimeLeft(UObject *WorldContextObject, int64 AnimationID)
|
||||
{
|
||||
double max = 0.0;
|
||||
FlxWorldClocks Clocks = UlxScriptedAnimationLibrary::GetAllWorldClocks(WorldContextObject);
|
||||
for (int i = 0; i < Animations.Num(); i++)
|
||||
{
|
||||
const FlxScriptedAnimation &Anim = Animations[i];
|
||||
if (Anim.AnimationStepID == AnimationID)
|
||||
{
|
||||
double Current = Anim.ChooseCorrectClock(Clocks);
|
||||
double TimeLeft = Anim.ClampedTimeLeft(Current);
|
||||
if (TimeLeft > max) max = TimeLeft;
|
||||
}
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
void UlxScriptedAnimations::FadeGarbage(const UObject *WorldContextObject, TArray<int64> KeepIDs)
|
||||
{
|
||||
FlxWorldClocks Clocks = UlxScriptedAnimationLibrary::GetAllWorldClocks(WorldContextObject);
|
||||
|
||||
Reference in New Issue
Block a user