feat: Implement core gameplay systems and data assets for health, stamina, stress, movement, hit reactions, and shield defense

This commit is contained in:
Lefteris Notas
2026-05-21 13:16:43 +03:00
parent 0b1128d209
commit 9ee0a65630
22 changed files with 480 additions and 14 deletions

View File

@@ -0,0 +1,13 @@
#include "Inventory/DA_EquipmentConfig.h"
float UDA_EquipmentConfig::GetResistance(FGameplayTag DamageType) const
{
for (const FDamageTypeResistance& Entry : DamageTypeResistances)
{
if (Entry.DamageType == DamageType)
{
return Entry.Resistance;
}
}
return 0.0f;
}

View File

@@ -0,0 +1,6 @@
#include "Player/BPC_HealthSystem.h"
UBPC_HealthSystem::UBPC_HealthSystem()
{
PrimaryComponentTick.bCanEverTick = false;
}

View File

@@ -0,0 +1,6 @@
#include "Player/BPC_MovementStateSystem.h"
UBPC_MovementStateSystem::UBPC_MovementStateSystem()
{
PrimaryComponentTick.bCanEverTick = true;
}

View File

@@ -0,0 +1,6 @@
#include "Player/BPC_StaminaSystem.h"
UBPC_StaminaSystem::UBPC_StaminaSystem()
{
PrimaryComponentTick.bCanEverTick = true;
}

View File

@@ -0,0 +1,6 @@
#include "Player/BPC_StressSystem.h"
UBPC_StressSystem::UBPC_StressSystem()
{
PrimaryComponentTick.bCanEverTick = true;
}

View File

@@ -0,0 +1,5 @@
#include "Player/PC_CoreController.h"
APC_CoreController::APC_CoreController()
{
}

View File

@@ -0,0 +1,5 @@
#include "Player/PS_CorePlayerState.h"
APS_CorePlayerState::APS_CorePlayerState()
{
}

View File

@@ -0,0 +1,13 @@
#include "State/DA_StateGatingTable.h"
bool UDA_StateGatingTable::IsActionGated(FGameplayTag ActionTag, FGameplayTag CurrentState) const
{
for (const FStateGatingRule& Rule : GatingRules)
{
if (Rule.ActionTag == ActionTag && Rule.BlockedByState == CurrentState)
{
return Rule.bIsBlocked;
}
}
return false;
}

View File

@@ -0,0 +1,11 @@
#include "Weapons/BPC_HitReactionSystem.h"
UBPC_HitReactionSystem::UBPC_HitReactionSystem()
{
PrimaryComponentTick.bCanEverTick = false;
}
void UBPC_HitReactionSystem::PlayHitReaction(float DamageAmount, FVector HitDirection, AActor* DamageCauser)
{
// Stub — Blueprint child provides animation selection logic.
}

View File

@@ -0,0 +1,6 @@
#include "Weapons/BPC_ShieldDefenseSystem.h"
UBPC_ShieldDefenseSystem::UBPC_ShieldDefenseSystem()
{
PrimaryComponentTick.bCanEverTick = false;
}