KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UKnockbackSystem.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
7#pragma once
8
9#include "CoreMinimal.h"
10#include "Components/ActorComponent.h"
11#include "FKnockbackData.h"
12#include "UKnockbackSystem.generated.h"
13
14
21UCLASS(Blueprintable, BlueprintType, ClassGroup=(Dopple), meta=(BlueprintSpawnableComponent) )
22class ONEPIECE_API UKnockbackSystem : public UActorComponent
23{
24 GENERATED_BODY()
25
26public:
28 UKnockbackSystem();
29
30protected:
32 virtual void BeginPlay() override;
37 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
38
39public:
44 UFUNCTION(BlueprintCallable, Category="Knockback")
45 void InitSystem(class APlayerActor* InOwner);
46
54 UFUNCTION(BlueprintCallable, Category="Knockback")
55 void OnKnockback(AActor* Target, AActor* Instigator, EDamageType Type, float Resistance);
56
57private:
64 static FVector ComputeKnockDir(const AActor* Target, const AActor* Instigator);
72 void Knockback(AActor* Target, AActor* Instigator, EDamageType Type, float Resistance);
74 void RestoreMovement();
76 void EnterFlying();
77
78private:
80 UPROPERTY()
81 TObjectPtr<class APlayerActor> Owner;
83 UPROPERTY()
84 TObjectPtr<class USkeletalMeshComponent> MeshComp;
86 UPROPERTY()
87 TObjectPtr<class UCharacterMovementComponent> MoveComp;
88
90 float PrevBrakingFriction = 1.f;
92 bool bFriction = false;
94 FTimerHandle RestoreTimer;
96 FTimerHandle FlyingTimer;
97};
EDamageType
Definition EDamageType.h:9
FKnockbackData 구조체를 선언합니다.
Main character driven directly by the player.