#pragma once #include "CoreMinimal.h" #include "UObject/NoExportTypes.h" #include "Components/ActorComponent.h" #include "CrossbowProjectileRecallable.generated.h" class APlayerCharacter; class UInstantUsable; class UInterpolatedFirstPersonStaticMeshComponent; UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent)) class UCrossbowProjectileRecallable : public UActorComponent { GENERATED_BODY() public: private: UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true)) UInstantUsable* Usable; UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, meta=(AllowPrivateAccess=true)) APlayerCharacter* RecallTarget; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float RecallStartTime; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float RecallSpeed; UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, meta=(AllowPrivateAccess=true)) FTransform StartTransform; UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, Transient, meta=(AllowPrivateAccess=true)) UInterpolatedFirstPersonStaticMeshComponent* FPMeshComponent; UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, meta=(AllowPrivateAccess=true)) bool IsRecallable; public: UCrossbowProjectileRecallable(); virtual void GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const override; private: UFUNCTION(BlueprintCallable, Reliable, Server) void Server_SetRecallTarget(APlayerCharacter* Player, const FTransform& startTrans); };