More work on anim queues

This commit is contained in:
2023-10-12 18:15:56 -04:00
parent 334a95481d
commit f7249e4d29
3 changed files with 56 additions and 28 deletions

View File

@@ -58,6 +58,14 @@ public:
// routine tries to find a string property "color" in the
// UObject, and then it sets that property to "blue."
//
// The prefix is prepended to the key names. For example,
// if one of the key-value pairs is "color=blue", and the
// prefix is "aq", then the property "aqColor=blue" will be
// stored in the UObject.
//
// All properties of the UObject starting with the specified
// prefix are cleared before unpacking the animation step.
//
// Returns true if all of the key-value pairs in the
// animation step could be unpacked into fields of the UObject.
// This could fail, for instance, if the UObject just doesn't
@@ -65,16 +73,10 @@ public:
// fail if there's a type mismatch. For example, "color=blue"
// cannot be stored in a property "color" of type int.
//
// The prefix is prepended to the key names. For example,
// if one of the key-value pairs is "color=blue", and the
// prefix is "aq", then the property "aqColor=blue" will be
// stored in the UObject.
// Automatically injects a boolean property "idle" representing
// whether the property's finished flag is set.
//
// If pre-clear is true, then all properties of the UObject
// starting with the specified prefix are cleared before
// unpacking the animation step.
//
bool Unpack(const FString& prefix, UObject* into, bool preclear = true) const;
bool Unpack(const FString& prefix, UObject* into) const;
// Auto-Execute
//
@@ -108,7 +110,10 @@ public:
static FString AnimationStepDebugString(const FlxAnimationStep& step);
UFUNCTION(BlueprintCallable, Meta = (DefaultToSelf = "into"), Category = Luprex)
static void UnpackAnimationStep(UObject* into, const FlxAnimationStep& step, const FString& VariableNamePrefix);
static void UnpackAnimationStep(UObject* into, const FlxAnimationStep& step, const FString& VariableNamePrefix = TEXT("aq"));
UFUNCTION(BlueprintCallable, BlueprintPure, Category = Luprex)
static bool AnimationStepEqual(const FlxAnimationStep &StepA, const FlxAnimationStep &StepB);
UFUNCTION(BlueprintCallable, BlueprintPure, Category = Luprex)
static bool AnimationStepIsIdle(const FlxAnimationStep &step);
@@ -241,7 +246,7 @@ public:
// Convert an AnimStep to an FString.
//
static FString DebugString(uint64 hash, std::string_view body);
static FString DebugString(bool injectidle, bool persistentonly, uint64 hash, std::string_view body);
};
////////////////////////////////////////////////