5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
9#include "PhysicalHitReactionsComponent.generated.h"
21UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent) )
29 virtual
void ComponentSetupComplete() override;
32 UFUNCTION(BlueprintCallable, Category="
Hit Reactions")
33 void SetDisabled(const
bool Disable = true){bDisabled = Disable;};
35 UFUNCTION(BlueprintCallable, Category=
"Hit Reactions")
36 void HitReaction(const FName& BoneHit, const FVector& HitVector, const
float Multiplier = 1);
37 UFUNCTION(BlueprintCallable, Category="
Hit Reactions")
40 void SetStrengthMultiplier(
float Strength);
43 UFUNCTION(BlueprintCallable, Category="
Hit Reactions")
44 void OnInjuredBodyPart(const
EBodyPartName InjuredBodyPart, const FVector& HitLocation, const TArray<
FBodyPart>& AllBodyParts);
45 UFUNCTION(BlueprintCallable, Category="
Hit Reactions")
46 void TakeHit(const
float Damage, const FVector& HitLocation, const FName& BoneName, const FVector& ShotFromDirection, const UDamageType* DamageType);
47 UFUNCTION(NetMulticast, Unreliable, BlueprintCallable, Category="
Hit Reactions")
48 void MulticastTakeHit(const
float Damage, const FVector& HitLocation, const FName& BoneName, const FVector& ShotFromDirection, const UDamageType* DamageType);
50 virtual
void OwnerDeath() override;
54 virtual
void OnComponentDestroyed(
bool bDestroyingHierarchy) override;
58 UPROPERTY(BlueprintReadOnly, Category="
Hit Reactions")
59 class UPhysicalAnimationComponent* PhysicalAnimationComponent;
61 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="
Hit Reactions")
62 float MaxFloppyTime = 1.5f;
63 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="
Hit Reactions")
64 float CounterMultiplier = 0.05f;
65 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="
Hit Reactions", meta=(ClampMin="0.1", ClampMax="20.0"))
66 float ImpulseMultiplier = 10.0f;
68 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="
Hit Reactions")
69 float BlendTimeMultiplier = 10.0f;
71 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="
Hit Reactions")
72 FName ProfileStrong = "
Strong";
73 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="
Hit Reactions")
74 FName ProfileMid = "
Mid";
75 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="
Hit Reactions")
76 FName ProfileWeak = "
Weak";
77 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="
Hit Reactions")
78 FName ProfileRagdoll = "
Ragdoll";
81 void PhysicalReaction();
84 bool bDisabled = false;
86 const FName
Spine = "Spine_01";
90 float HitReactionTimeRemaining = 0.0f;
92 FTimerHandle ReactionLengthTimer;
94 FVector LastHitVector = FVector::ZeroVector;
95 FName LastHitBone =
Spine;
96 float LastMultiplier = 1.0f;
EBodyPartName
Definition BaseData.h:133
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
EPhysicalBodyStrength
Definition HealthData.h:17
Represents a character component that can be added to an actor.
This component handles physical hit reactions for a character.
Definition HealthData.h:26