30 lines
945 B
C++
Executable file
30 lines
945 B
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/NoExportTypes.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "Curves/CurveFloat.h"
|
|
#include "BodyRotationManagerComponent.generated.h"
|
|
|
|
class USceneComponent;
|
|
|
|
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
|
|
class UBodyRotationManagerComponent : public UActorComponent {
|
|
GENERATED_BODY()
|
|
public:
|
|
protected:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
FRuntimeFloatCurve KnockBackCurve;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Export, meta=(AllowPrivateAccess=true))
|
|
TWeakObjectPtr<USceneComponent> RotationComponent;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float LerpSpeed;
|
|
|
|
public:
|
|
UBodyRotationManagerComponent();
|
|
UFUNCTION(BlueprintCallable)
|
|
void ApplyKnockBack(float force, float Duration, const FVector& Direction);
|
|
|
|
};
|
|
|