2024-04-12 11:49:22 -07:00
|
|
|
#pragma once
|
|
|
|
|
2024-04-13 08:09:22 -07:00
|
|
|
#include "AbilitySystemInterface.h"
|
2024-04-12 11:49:22 -07:00
|
|
|
#include "GameFramework/Character.h"
|
|
|
|
|
2024-04-13 08:09:22 -07:00
|
|
|
#include "GasaCommon.h"
|
2024-04-13 08:56:19 -07:00
|
|
|
#include "Game/GasaPlayerState.h"
|
2024-04-13 08:09:22 -07:00
|
|
|
|
2024-04-12 11:49:22 -07:00
|
|
|
#include "GasaCharacter.generated.h"
|
|
|
|
|
2024-04-12 19:05:09 -07:00
|
|
|
UENUM(BlueprintType)
|
|
|
|
enum class EHighlight : uint8
|
|
|
|
{
|
|
|
|
Disabled,
|
|
|
|
Enabled,
|
|
|
|
};
|
|
|
|
|
2024-04-12 11:49:22 -07:00
|
|
|
UCLASS(Abstract)
|
|
|
|
class GASA_API AGasaCharacter : public ACharacter
|
2024-04-13 08:09:22 -07:00
|
|
|
, public IAbilitySystemInterface
|
2024-04-12 11:49:22 -07:00
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
public:
|
2024-04-13 08:09:22 -07:00
|
|
|
#pragma region Ability System
|
|
|
|
UPROPERTY(EditAnywhere, Category="Ability System")
|
|
|
|
bool bAutoAbilitySystem = true;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category="Ability System")
|
|
|
|
TObjectPtr<UAbilitySystemComponent> AbilitySystem;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category="Ability System")
|
|
|
|
TObjectPtr<UAttributeSet> Attributes;
|
|
|
|
#pragma endregion Ability System
|
|
|
|
|
2024-04-12 11:49:22 -07:00
|
|
|
#pragma region Combat
|
|
|
|
UPROPERTY(EditAnywhere, Category="Combat")
|
|
|
|
TObjectPtr<USkeletalMeshComponent> Weapon;
|
|
|
|
#pragma endregion Combat
|
2024-04-12 17:16:25 -07:00
|
|
|
|
|
|
|
#pragma region Highlighting
|
2024-04-12 23:31:49 -07:00
|
|
|
static constexpr float HighlightStencilDepth = 256.0;
|
|
|
|
|
2024-04-12 19:37:31 -07:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Highlighting")
|
2024-04-12 19:05:09 -07:00
|
|
|
EHighlight HighlightState;
|
2024-04-12 19:37:31 -07:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Highlighting")
|
|
|
|
FLinearColor HighlightColor;
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, Category="Highlighting")
|
2024-04-12 19:05:09 -07:00
|
|
|
void SetHighlight( EHighlight Desired );
|
2024-04-12 17:16:25 -07:00
|
|
|
|
2024-04-12 19:37:31 -07:00
|
|
|
UFUNCTION(BlueprintCallable, Category="Highlighting")
|
2024-04-12 19:05:09 -07:00
|
|
|
FORCEINLINE void Highlight() { SetHighlight(EHighlight::Enabled); };
|
2024-04-12 17:16:25 -07:00
|
|
|
|
2024-04-12 19:37:31 -07:00
|
|
|
UFUNCTION(BlueprintCallable, Category="Highlighting")
|
2024-04-12 17:16:25 -07:00
|
|
|
FORCEINLINE void Dehighlight() { SetHighlight(EHighlight::Disabled); };
|
|
|
|
#pragma endregion Highlighting
|
2024-04-12 23:31:49 -07:00
|
|
|
|
2024-04-12 13:30:01 -07:00
|
|
|
AGasaCharacter();
|
2024-04-13 08:09:22 -07:00
|
|
|
|
2024-04-13 08:56:19 -07:00
|
|
|
FORCEINLINE AGasaPlayerState* GetGasaPlayerState() { return GetPlayerState<AGasaPlayerState>(); }
|
|
|
|
|
2024-04-13 08:09:22 -07:00
|
|
|
#pragma region IAbilitySystem
|
|
|
|
FORCEINLINE UAttributeSet* GetAttributes() { return Attributes; }
|
|
|
|
FORCEINLINE UAbilitySystemComponent* GetAbilitySystemComponent() const override { return AbilitySystem; }
|
|
|
|
#pragma endregion IAbilitySystem
|
2024-04-13 08:56:19 -07:00
|
|
|
|
|
|
|
#pragma region Pawn
|
|
|
|
void PossessedBy(AController* NewController) override;
|
|
|
|
|
|
|
|
void OnRep_PlayerState() override;
|
|
|
|
#pragma endregion Pawn
|
2024-04-12 13:30:01 -07:00
|
|
|
|
2024-04-12 11:49:22 -07:00
|
|
|
#pragma region Actor
|
|
|
|
void BeginPlay() override;
|
2024-04-12 19:05:09 -07:00
|
|
|
|
|
|
|
void Tick(float DeltaSeconds) override;
|
2024-04-12 11:49:22 -07:00
|
|
|
#pragma endregion Actor
|
|
|
|
};
|
2024-04-13 08:09:22 -07:00
|
|
|
|
|
|
|
namespace Gasa
|
|
|
|
{
|
|
|
|
// UGasaAbilitySystemComp* GetAbilitySystem(AGasaCharacter* Object)
|
|
|
|
// {
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
}
|