#pragma once

#include "CoreMinimal.h"
#include "CompetenceAction.h"
#include "GameplayTagContainer.h"
#include "Engine/HitResult.h"
#include "TeleportNearSurvivorScream.generated.h"

class UAkAudioEvent;
class UCapsuleComponent;
class AActor;
class UPrimitiveComponent;

UCLASS(Blueprintable, EditInlineNew)
class UTeleportNearSurvivorScream : public UCompetenceAction
{
	GENERATED_BODY()

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	UAkAudioEvent* _screamSoundEvent;

	UPROPERTY(EditAnywhere)
	FGameplayTag _scoreEventTag;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _detectionCapsuleHalfHeight;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _detectionCapsuleRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, Export, meta=(AllowPrivateAccess=true))
	UCapsuleComponent* _survivorDetector;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	TSet<AActor*> _alreadyDetectedPlayers;

private:
	UFUNCTION()
	void OnDetectorOverlapBegin(UPrimitiveComponent* overlappedComponent, AActor* otherActor, UPrimitiveComponent* otherComp, int32 otherBodyIndex, bool bFromSweep, const FHitResult& sweepResult);

public:
	UTeleportNearSurvivorScream();
};

FORCEINLINE uint32 GetTypeHash(const UTeleportNearSurvivorScream) { return 0; }
