95 lines
3.1 KiB
C++
Executable file
95 lines
3.1 KiB
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/NoExportTypes.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "Curves/CurveFloat.h"
|
|
#include "Engine/NetSerialization.h"
|
|
#include "DashSigDelegate.h"
|
|
#include "EDashPointsGenerationMode.h"
|
|
#include "DashPoints.generated.h"
|
|
|
|
class AActor;
|
|
class UHealthComponentBase;
|
|
|
|
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
|
|
class UDashPoints : public UActorComponent {
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
FDashSig OnStartDashEvent;
|
|
|
|
UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
FDashSig OnStopDashEvent;
|
|
|
|
protected:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, meta=(AllowPrivateAccess=true))
|
|
FVector_NetQuantize DashLocation;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
FRuntimeFloatCurve DashSpeedCurve;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float PointOffset;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MaxRangeFromPlayer;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MinRangeFromPlayer;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MinHeightAboveTarget;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float MaxHeightAboveTarget;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float safeReduction;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float AcceptedDashradius;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float DashSpeed;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float SlowdownRadius;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
int32 IgnoreTheClosestPoints;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
EDashPointsGenerationMode GenerationMode;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_Dashing, meta=(AllowPrivateAccess=true))
|
|
bool IsDashing;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool IgnoreRules;
|
|
|
|
public:
|
|
UDashPoints();
|
|
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void UpdateDashPointData();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void StopDashing();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void StartDashing();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnRep_Dashing();
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnParentDeath(UHealthComponentBase* Health);
|
|
|
|
public:
|
|
UFUNCTION(BlueprintCallable)
|
|
FVector GetDashPoint(AActor* fromTarget, bool& success);
|
|
|
|
};
|
|
|