9#include "CoreMinimal.h"
10#include "Components/ActorComponent.h"
12#include "UKnockbackSystem.generated.h"
21UCLASS(Blueprintable, BlueprintType, ClassGroup=(Dopple), meta=(BlueprintSpawnableComponent) )
22class ONEPIECE_API UKnockbackSystem :
public UActorComponent
32 virtual
void BeginPlay() override;
37 virtual
void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
44 UFUNCTION(BlueprintCallable, Category="Knockback")
54 UFUNCTION(BlueprintCallable, Category="Knockback")
55 void OnKnockback(AActor* Target, AActor* Instigator,
EDamageType Type,
float Resistance);
64 static FVector ComputeKnockDir(const AActor* Target, const AActor* Instigator);
72 void Knockback(AActor* Target, AActor* Instigator,
EDamageType Type,
float Resistance);
74 void RestoreMovement();
84 TObjectPtr<class USkeletalMeshComponent> MeshComp;
87 TObjectPtr<class UCharacterMovementComponent> MoveComp;
90 float PrevBrakingFriction = 1.f;
92 bool bFriction = false;
94 FTimerHandle RestoreTimer;
96 FTimerHandle FlyingTimer;
FKnockbackData 구조체를 선언합니다.
Main character driven directly by the player.