feat: Implement core gameplay systems and data assets for health, stamina, stress, movement, hit reactions, and shield defense
This commit is contained in:
29
Source/Framework/Public/Player/BPC_HealthSystem.h
Normal file
29
Source/Framework/Public/Player/BPC_HealthSystem.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/ActorComponent.h"
|
||||
#include "BPC_HealthSystem.generated.h"
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnHealthChanged, float, CurrentHealth, float, MaxHealth);
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnDeath);
|
||||
|
||||
UCLASS(Blueprintable, ClassGroup=(Framework), meta=(BlueprintSpawnableComponent))
|
||||
class FRAMEWORK_API UBPC_HealthSystem : public UActorComponent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UBPC_HealthSystem();
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Framework|Health")
|
||||
float MaxHealth = 100.0f;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "Framework|Health")
|
||||
float CurrentHealth = 100.0f;
|
||||
|
||||
UPROPERTY(BlueprintAssignable, Category = "Framework|Events")
|
||||
FOnHealthChanged OnHealthChanged;
|
||||
|
||||
UPROPERTY(BlueprintAssignable, Category = "Framework|Events")
|
||||
FOnDeath OnDeath;
|
||||
};
|
||||
Reference in New Issue
Block a user