From dcd0a283fe1e77751fc17f378cca05232d3d11b9 Mon Sep 17 00:00:00 2001 From: Kevin Poretti Date: Wed, 18 Sep 2024 20:49:41 -0400 Subject: [PATCH] Even more documentation --- .../GameplayFramework/FFAIController.cpp | 2 +- .../GameplayFramework/FFAIController.h | 2 +- .../Input/FFPlayerController.cpp | 2 +- .../Input/FFPlayerController.h | 2 +- .../State/IFFStateOwnerInterface.h | 36 +++++++++++++++---- 5 files changed, 33 insertions(+), 11 deletions(-) diff --git a/Source/UnrealFightingFramework/GameplayFramework/FFAIController.cpp b/Source/UnrealFightingFramework/GameplayFramework/FFAIController.cpp index dd45e4b..e8f802e 100644 --- a/Source/UnrealFightingFramework/GameplayFramework/FFAIController.cpp +++ b/Source/UnrealFightingFramework/GameplayFramework/FFAIController.cpp @@ -19,7 +19,7 @@ bool AFFAIController::CheckInputSequences(const TArray& InInpu return false; } -FVector AFFAIController::GetInputAsWorldDirection() const +FVector AFFAIController::GetMoveInputAsWorldDirection() const { return FVector::ZeroVector; } diff --git a/Source/UnrealFightingFramework/GameplayFramework/FFAIController.h b/Source/UnrealFightingFramework/GameplayFramework/FFAIController.h index b0b0b58..5ee2cb2 100644 --- a/Source/UnrealFightingFramework/GameplayFramework/FFAIController.h +++ b/Source/UnrealFightingFramework/GameplayFramework/FFAIController.h @@ -30,7 +30,7 @@ public: UFUNCTION(BlueprintCallable, Category="UFF State Owner Interface") virtual bool CheckInputSequences(const TArray& InInputSequences) override; - virtual FVector GetInputAsWorldDirection() const override; + virtual FVector GetMoveInputAsWorldDirection() const override; virtual void DisableMostRecentInput() override; // End of IFFStateOwnerInterface diff --git a/Source/UnrealFightingFramework/Input/FFPlayerController.cpp b/Source/UnrealFightingFramework/Input/FFPlayerController.cpp index 2a3f8cd..417712d 100644 --- a/Source/UnrealFightingFramework/Input/FFPlayerController.cpp +++ b/Source/UnrealFightingFramework/Input/FFPlayerController.cpp @@ -39,7 +39,7 @@ void AFFPlayerController::ConsumeMoveInput() } -FVector AFFPlayerController::GetInputAsWorldDirection() const +FVector AFFPlayerController::GetMoveInputAsWorldDirection() const { FRotator ViewRotationYaw = FRotator(0.0f, ModifiedInput.LookRot.Yaw, 0.0f); FVector ForwardInput = UKismetMathLibrary::GetForwardVector(ViewRotationYaw) * ModifiedInput.MoveAxes.Y; diff --git a/Source/UnrealFightingFramework/Input/FFPlayerController.h b/Source/UnrealFightingFramework/Input/FFPlayerController.h index 952e0a1..662852f 100644 --- a/Source/UnrealFightingFramework/Input/FFPlayerController.h +++ b/Source/UnrealFightingFramework/Input/FFPlayerController.h @@ -72,7 +72,7 @@ public: UFUNCTION() virtual bool CheckInputSequences(const TArray& InputSequences) override; - virtual FVector GetInputAsWorldDirection() const override; + virtual FVector GetMoveInputAsWorldDirection() const override; virtual void DisableMostRecentInput() override; // End of IFFStateOwnerInterface diff --git a/Source/UnrealFightingFramework/State/IFFStateOwnerInterface.h b/Source/UnrealFightingFramework/State/IFFStateOwnerInterface.h index ae9fc0d..cf1dba9 100644 --- a/Source/UnrealFightingFramework/State/IFFStateOwnerInterface.h +++ b/Source/UnrealFightingFramework/State/IFFStateOwnerInterface.h @@ -18,24 +18,46 @@ class UFFStateOwnerInterface : public UInterface }; /** - * + * TODO: document */ + +// TODO: why is this an interface again? class UNREALFIGHTINGFRAMEWORK_API IFFStateOwnerInterface { GENERATED_BODY() public: - // TODO: document + /** + * @brief Checks to see if the provided input sequence has a valid matching series of inputs in + * the input buffer + * + * @param InInputSequence sequence of inputs to check in the input buffer + * @return true if the input sequence has a valid matching series of inputs in the input buffer + */ UFUNCTION(BlueprintCallable, Category="UFF State Owner Interface") virtual bool CheckInputSequence(const FFFInputSequence& InInputSequence) = 0; - - // TODO: document + + /** + * @brief Checks to see if at least one of the provided input sequences has a valid matching + * series of inputs in the input buffer + * + * @param InInputSequences array of sequences of inputs to check in the input buffer + * @return true if at least one input sequence has a valid matching series of inputs in the + * input buffer + */ UFUNCTION(BlueprintCallable, Category="UFF State Owner Interface") virtual bool CheckInputSequences(const TArray& InInputSequences) = 0; - // TODO: document - virtual FVector GetInputAsWorldDirection() const = 0; + /** + * @brief Convert 2D movement input a 3D world direction relative to the view orientation + * + * @return direction of player's 2D movement input in world space + */ + virtual FVector GetMoveInputAsWorldDirection() const = 0; - // TODO: document + /** + * @brief Sets the current tick's input in the input buffer as disabled, preventing it from + * being considered as valid input for input sequence interpretation + */ virtual void DisableMostRecentInput() = 0; };