DRG-Femboy-Voice/Source/FSD/Public/PlayerProximityTracker.h
2025-04-15 12:39:31 -07:00

47 lines
1.9 KiB
C++
Executable file

#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "Components/ActorComponent.h"
#include "PlayerProximityDelegateDelegate.h"
#include "PlayerSphere.h"
#include "ProximityTriggerItem.h"
#include "PlayerProximityTracker.generated.h"
class UObject;
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
class UPlayerProximityTracker : public UActorComponent {
GENERATED_BODY()
public:
protected:
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float MaxDistanceBetweenPlayers;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float PlayerSpheresUpdateRatePerSecond;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TArray<FPlayerSphere> PlayerSpheres;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TArray<FProximityTriggerItem> LocalPlayerProximityTriggers;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TArray<FProximityTriggerItem> AnyPlayerProximityTriggers;
public:
UPlayerProximityTracker();
UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject"))
static void Receive_RegisterForLocalPlayerProximity(UObject* WorldContextObject, const FVector& Location, float Distance, const FPlayerProximityDelegate& proximityCallback, bool triggerOnlyOnce);
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable, meta=(WorldContext="WorldContextObject"))
static void Receive_RegisterForAnyPlayerProximity(UObject* WorldContextObject, const FVector& Location, float Distance, const FPlayerProximityDelegate& proximityCallback, bool triggerOnlyOnce);
UFUNCTION(BlueprintCallable, BlueprintPure)
FPlayerSphere GetPrimarySphere() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
TArray<FPlayerSphere> GetPlayerSpheres() const;
};