Files
FNGameProj/Source/FortniteGame/Public/FortTrackMovementComponent.h
2024-01-21 00:41:14 +01:00

81 lines
2.7 KiB
C++

#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "GameFramework/MovementComponent.h"
#include "FortLostTrackDelegate.h"
#include "FortOutOfTrackDelegate.h"
#include "RepTrackMovement.h"
#include "TrackMovement.h"
#include "FortTrackMovementComponent.generated.h"
class AFortTrack;
class USplineComponent;
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
class UFortTrackMovementComponent : public UMovementComponent {
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
AFortTrack* OptionalEditorPlacedTrack;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
FVector TrackSnapExtent;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
FVector TurnSpeed;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float SplineLocationOffsetZ;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float DiscoverSplineFrequency;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, meta=(AllowPrivateAccess=true))
float TrackVelocity;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
bool bReverseYawWhenReversedOnSpline;
UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
FFortOutOfTrack OnOutOfTrack;
UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
FFortLostTrack OnLostTrack;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
FTrackMovement TrackMovement;
UPROPERTY(BlueprintReadWrite, EditAnywhere, ReplicatedUsing=OnRep_ReplicatedTrackMovement, meta=(AllowPrivateAccess=true))
FRepTrackMovement ReplicatedTrackMovement;
private:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
float ClientPredictionSpeedModifier;
public:
UFortTrackMovementComponent();
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
private:
UFUNCTION(BlueprintCallable)
void OnRep_ReplicatedTrackMovement();
public:
UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsReverseDirection() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
AFortTrack* GetTrack() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
USplineComponent* GetSpline() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
float GetDistanceAlongSpline() const;
UFUNCTION(BlueprintCallable)
void FlipDirection();
};