From 842ae8a32a8f4daa34a9b6b5f9ad5417906b6a96 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 12 Apr 2024 20:16:25 -0400 Subject: [PATCH] 12. "Enemy Interface" Avoding lifting the "highlighting" to an enemy interface until it proves to me its necessary --- Project/Source/Gasa/Character/GasaCharacter.cpp | 5 +++++ Project/Source/Gasa/Character/GasaCharacter.h | 11 +++++++++++ Project/Source/Gasa/GasaCommon.h | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/Project/Source/Gasa/Character/GasaCharacter.cpp b/Project/Source/Gasa/Character/GasaCharacter.cpp index 9990966..2b3ad80 100644 --- a/Project/Source/Gasa/Character/GasaCharacter.cpp +++ b/Project/Source/Gasa/Character/GasaCharacter.cpp @@ -4,6 +4,11 @@ #include "GameFramework/CharacterMovementComponent.h" #include "GameFramework/SpringArmComponent.h" +void AGasaCharacter::SetHighlight(EHighlight desired) +{ + +} + AGasaCharacter::AGasaCharacter() { PrimaryActorTick.bCanEverTick = false; diff --git a/Project/Source/Gasa/Character/GasaCharacter.h b/Project/Source/Gasa/Character/GasaCharacter.h index 1d76696..d5ba1ea 100644 --- a/Project/Source/Gasa/Character/GasaCharacter.h +++ b/Project/Source/Gasa/Character/GasaCharacter.h @@ -22,6 +22,17 @@ public: UPROPERTY(EditAnywhere, Category="Combat") TObjectPtr Weapon; #pragma endregion Combat + + // This will be implemented in the base until it needs to be lifted into an abstraction. +#pragma region Highlighting + void SetHighlight( EHighlight desired ); + + UFUNCTION(BlueprintCallable) + FORCEINLINE void Highlight() { SetHighlight(EHighlight::Disabled); }; + + UFUNCTION(BlueprintCallable) + FORCEINLINE void Dehighlight() { SetHighlight(EHighlight::Disabled); }; +#pragma endregion Highlighting AGasaCharacter(); diff --git a/Project/Source/Gasa/GasaCommon.h b/Project/Source/Gasa/GasaCommon.h index 53c28d4..9421e76 100644 --- a/Project/Source/Gasa/GasaCommon.h +++ b/Project/Source/Gasa/GasaCommon.h @@ -2,6 +2,13 @@ #include "CoreMinimal.h" // #define private protected +UENUM(BlueprintType) +enum class EHighlight +{ + Disabled, + Enabled, +}; + class UCameraComponent; class UInputAction; struct FInputActionValue;