95 lines
3.0 KiB
C++
95 lines
3.0 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "AbilitySystemInterface.h"
|
|
#include "GameplayTagContainer.h"
|
|
#include "GameplayEffectTypes.h"
|
|
#include "GameFramework/PlayerState.h"
|
|
#include "HYPlayerState.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class HWANYOUNG2_API AHYPlayerState : public APlayerState, public IAbilitySystemInterface
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AHYPlayerState();
|
|
|
|
virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override;
|
|
|
|
class UHYPlayerCharacAttributeSet* GetAttributeSetBase() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State")
|
|
bool IsAlive() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|UI")
|
|
void ShowAbilityConfirmCancelText(bool showText);
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetHealth() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetMaxHealth() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetMana() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetMaxMana() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetStamina() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetMaxStamina() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetGaugeP() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetMaxGaugeP() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Player State|Attributes")
|
|
float GetPlayerLevel() const;
|
|
|
|
|
|
protected:
|
|
UPROPERTY()
|
|
class UHYCharacAbilitySystemComponent* AbilitySystemComponent;
|
|
|
|
UPROPERTY()
|
|
class UHYPlayerCharacAttributeSet* AttributeSetBase;
|
|
|
|
FGameplayTag DeadTag;
|
|
|
|
FDelegateHandle HPChangedDelegateHandle;
|
|
FDelegateHandle MaxHPChangedDelegateHandle;
|
|
FDelegateHandle MPChangedDelegateHandle;
|
|
FDelegateHandle MaxMPChangedDelegateHandle;
|
|
FDelegateHandle StaminaChangedDelegateHandle;
|
|
FDelegateHandle MaxStaminaChangedDelegateHandle;
|
|
FDelegateHandle GaugePChangedDelegateHandle;
|
|
FDelegateHandle MaxGaugePChangedDelegateHandle;
|
|
FDelegateHandle CharacterLevelChangedDelegateHandle;
|
|
|
|
virtual void BeginPlay() override;
|
|
|
|
virtual void HealthChanged(const FOnAttributeChangeData& Data);
|
|
virtual void MaxHealthChanged(const FOnAttributeChangeData& Data);
|
|
virtual void ManaChanged(const FOnAttributeChangeData& Data);
|
|
virtual void MaxManaChanged(const FOnAttributeChangeData& Data);
|
|
virtual void StaminaChanged(const FOnAttributeChangeData& Data);
|
|
virtual void MaxStaminaChanged(const FOnAttributeChangeData& Data);
|
|
virtual void GaugePChanged(const FOnAttributeChangeData& Data);
|
|
virtual void MaxGaugePChanged(const FOnAttributeChangeData& Data);
|
|
virtual void PlayerLevelChanged(const FOnAttributeChangeData& Data);
|
|
|
|
virtual void StunTagChanged(const FGameplayTag CallbackTag, int32 NewCount);
|
|
|
|
};
|