// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "EndlessVendetta/BountySystem/WaypointActor.h"
#include "GameFramework/Actor.h"
#include "BaseGadgetTutorial.generated.h"

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompletedGadgetTutorial);

UCLASS()
class ENDLESSVENDETTA_API ABaseGadgetTutorial : public AActor
{
	GENERATED_BODY()

protected:
	AWaypointActor* WaypointActor;
	
	UPROPERTY(EditDefaultsOnly, Category = "Gadget Tutorial")
	TSubclassOf<AWaypointActor> WaypointClass;
	
	UPROPERTY(EditDefaultsOnly, Category = "Gadget Tutorial")
	UTexture2D* WaypointIcon;

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;
	
	void SpawnNewWaypoint(FVector Loc, FString Desc);

	// Stops tutorial clues from appearing and broadcasts completion
	void FinishedTutorial();
	
	// Spawns Enemies, sets waypoint locations, etc...
	UFUNCTION(BlueprintImplementableEvent)
	void SetupTutorial();

	// Destroy's enemies and other separate spawned in elements by this tutorial class
	UFUNCTION(BlueprintImplementableEvent)
	void DespawnEnemies();
	
public:
	// Sets default values for this actor's properties
	ABaseGadgetTutorial();

	UPROPERTY(BlueprintAssignable)
	FCompletedGadgetTutorial CompletedGadgetTutorial;

	void DestroyTutorial();
	

};
