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;
|
||||
};
|
||||
23
Source/Framework/Public/Player/BPC_MovementStateSystem.h
Normal file
23
Source/Framework/Public/Player/BPC_MovementStateSystem.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/ActorComponent.h"
|
||||
#include "GameplayTagContainer.h"
|
||||
#include "BPC_MovementStateSystem.generated.h"
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnMovementModeChanged, FGameplayTag, NewMode, FGameplayTag, OldMode);
|
||||
|
||||
UCLASS(Blueprintable, ClassGroup=(Framework), meta=(BlueprintSpawnableComponent))
|
||||
class FRAMEWORK_API UBPC_MovementStateSystem : public UActorComponent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UBPC_MovementStateSystem();
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "Framework|Movement")
|
||||
FGameplayTag CurrentMovementMode;
|
||||
|
||||
UPROPERTY(BlueprintAssignable, Category = "Framework|Events")
|
||||
FOnMovementModeChanged OnMovementModeChanged;
|
||||
};
|
||||
25
Source/Framework/Public/Player/BPC_StaminaSystem.h
Normal file
25
Source/Framework/Public/Player/BPC_StaminaSystem.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/ActorComponent.h"
|
||||
#include "BPC_StaminaSystem.generated.h"
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnExhaustionStateChanged, bool, bExhausted);
|
||||
|
||||
UCLASS(Blueprintable, ClassGroup=(Framework), meta=(BlueprintSpawnableComponent))
|
||||
class FRAMEWORK_API UBPC_StaminaSystem : public UActorComponent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UBPC_StaminaSystem();
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Framework|Stamina")
|
||||
float MaxStamina = 100.0f;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "Framework|Stamina")
|
||||
float CurrentStamina = 100.0f;
|
||||
|
||||
UPROPERTY(BlueprintAssignable, Category = "Framework|Events")
|
||||
FOnExhaustionStateChanged OnExhaustionStateChanged;
|
||||
};
|
||||
32
Source/Framework/Public/Player/BPC_StressSystem.h
Normal file
32
Source/Framework/Public/Player/BPC_StressSystem.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/ActorComponent.h"
|
||||
#include "BPC_StressSystem.generated.h"
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class EStressTier : uint8
|
||||
{
|
||||
Calm UMETA(DisplayName = "Calm"),
|
||||
Tense UMETA(DisplayName = "Tense"),
|
||||
Distressed UMETA(DisplayName = "Distressed"),
|
||||
Panic UMETA(DisplayName = "Panic"),
|
||||
Catatonic UMETA(DisplayName = "Catatonic"),
|
||||
};
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStressTierChanged, EStressTier, NewTier);
|
||||
|
||||
UCLASS(Blueprintable, ClassGroup=(Framework), meta=(BlueprintSpawnableComponent))
|
||||
class FRAMEWORK_API UBPC_StressSystem : public UActorComponent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UBPC_StressSystem();
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "Framework|Stress")
|
||||
EStressTier StressTier = EStressTier::Calm;
|
||||
|
||||
UPROPERTY(BlueprintAssignable, Category = "Framework|Events")
|
||||
FOnStressTierChanged OnStressTierChanged;
|
||||
};
|
||||
14
Source/Framework/Public/Player/PC_CoreController.h
Normal file
14
Source/Framework/Public/Player/PC_CoreController.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "PC_CoreController.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class FRAMEWORK_API APC_CoreController : public APlayerController
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
APC_CoreController();
|
||||
};
|
||||
14
Source/Framework/Public/Player/PS_CorePlayerState.h
Normal file
14
Source/Framework/Public/Player/PS_CorePlayerState.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/PlayerState.h"
|
||||
#include "PS_CorePlayerState.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class FRAMEWORK_API APS_CorePlayerState : public APlayerState
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
APS_CorePlayerState();
|
||||
};
|
||||
Reference in New Issue
Block a user