#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "ParadiseData.h"
#include "LevelParadise.generated.h"

class USceneComponent;
class ADBDPlayer;

UCLASS(Blueprintable)
class DEADBYDAYLIGHT_API ALevelParadise : public AActor
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float LoopStartDistance;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float LoopDistance;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	USceneComponent* MainPlayerSpawnPoint;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	TArray<USceneComponent*> OtherSurvivorSpawnPoints;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced)
	TArray<USceneComponent*> ParadiseTiles;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	AActor* ParadiseViewTarget;

private:
	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, meta=(AllowPrivateAccess=true))
	ADBDPlayer* _spawnedMainPawn;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Transient, Instanced, meta=(AllowPrivateAccess=true))
	USceneComponent* _runnerComponent;

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

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

public:
	UFUNCTION(BlueprintCallable)
	void ParadiseEntered(const FParadiseData& playerData);

private:
	UFUNCTION(BlueprintCallable)
	void OnInterpolationDone();

public:
	ALevelParadise();
};

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