5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
8#include "ProjectilePilotComponent.generated.h"
16UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
17class CK_UE_API UProjectilePilotComponent :
public UActorComponent
22 UProjectilePilotComponent();
25 UFUNCTION(BlueprintCallable, Category = "Projectile|Pilot")
26 void Pilot(const FVector& InStart, const FVector& InDirectionOrTarget);
28 UFUNCTION(BlueprintCallable, Category = "Projectile|Pilot")
34 UFUNCTION(BlueprintPure, Category = "Projectile|Pilot")
35 FORCEINLINE FVector GetVelocity()
const
37 return MovementMode ? MovementMode->GetCurrentVelocity() : FVector::ZeroVector;
40 UFUNCTION(BlueprintPure, Category =
"Projectile|Pilot")
41 FORCEINLINE
bool IsFlying()
const
46 FORCEINLINE
float GetExpectedTravelDuration()
const
48 return IsValid(MovementMode) ? MovementMode->GetProjectileDuration() : 0.0f;
52 virtual void TickComponent(
float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
override;
55 void BeginFlight(
const FVector& InStart,
const FVector& InDirectionOrTarget);
59 UPROPERTY(BlueprintAssignable, Category =
"Projectile|Pilot")
60 FOnProjectileArrived OnArrived;
62 UPROPERTY(EditAnywhere, Instanced, Category = "Projectile|Pilot")
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnProjectileArrived)
Definition ProjectileMovementBase.h:12