39 lines
1.1 KiB
C++
Executable file
39 lines
1.1 KiB
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "HitReactionComponent.generated.h"
|
|
|
|
class UAnimSequenceBase;
|
|
class USkeletalMeshComponent;
|
|
|
|
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
|
|
class UHitReactionComponent : public UActorComponent {
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
TArray<UAnimSequenceBase*> HitReactions;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float FirstHitReactBlendIn;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float OverrideHitReactBlendIn;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool AllowHitReactions;
|
|
|
|
protected:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, Transient, meta=(AllowPrivateAccess=true))
|
|
USkeletalMeshComponent* SkeletalMesh;
|
|
|
|
public:
|
|
UHitReactionComponent();
|
|
UFUNCTION(BlueprintCallable)
|
|
void PlayHitReaction();
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnDamageTaken(float Amount);
|
|
|
|
};
|
|
|