From 85f0cbf804da4711cdb96f6ee046ecf0ec77b180 Mon Sep 17 00:00:00 2001 From: Kevin Poretti Date: Sat, 1 Jul 2023 19:36:44 -0400 Subject: [PATCH] Implement the "held down" button state --- .../Input/FFInputBufferComponent.cpp | 6 ++++++ .../UnrealFightingFramework/Input/FFInputBufferComponent.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Source/UnrealFightingFramework/Input/FFInputBufferComponent.cpp b/Source/UnrealFightingFramework/Input/FFInputBufferComponent.cpp index ff1080a..5bf3e0b 100644 --- a/Source/UnrealFightingFramework/Input/FFInputBufferComponent.cpp +++ b/Source/UnrealFightingFramework/Input/FFInputBufferComponent.cpp @@ -42,6 +42,12 @@ bool UFFInputBufferComponent::CheckInputSequence(const FFFInputSequence& InputSe CondIdx--; } break; + case EFFButtonState::BTNS_Down: + if(CurrInput & RequiredButtons & ~CurrDisable) + { + CondIdx--; + } + break; // TODO: implement button held condition /* case EFFButtonState::BTNS_Held: diff --git a/Source/UnrealFightingFramework/Input/FFInputBufferComponent.h b/Source/UnrealFightingFramework/Input/FFInputBufferComponent.h index 4ef704f..c8015dc 100644 --- a/Source/UnrealFightingFramework/Input/FFInputBufferComponent.h +++ b/Source/UnrealFightingFramework/Input/FFInputBufferComponent.h @@ -16,6 +16,7 @@ enum class EFFButtonState : uint8 { BTNS_Pressed UMETA(DisplayName="Pressed"), BTNS_Released UMETA(DisplayName="Released"), + BTNS_Down UMETA(DisplayName="Down"), //BTNS_Held UMETA(DisplayName="Held"), BTNS_MAX UMETA(Hidden) };