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

#pragma once

#include "CoreMinimal.h"
#include "AIController.h"
#include "Perception/AIPerceptionTypes.h"
#include "AI_EnemyController.generated.h"

UCLASS()
class ENDLESSVENDETTA_API AAI_EnemyController : public AAIController
{
	GENERATED_BODY()

public:
	// Sets default values for this actor's properties
	explicit AAI_EnemyController(FObjectInitializer const& ObjectInitializer);

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;
	virtual void OnPossess(APawn* InPawn) override;

public:
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	UFUNCTION(BlueprintCallable)
	void AssignPatrolPathLate();

private:
	UPROPERTY()
	class UAISenseConfig_Sight* SightConfig;
	UPROPERTY()
	class UAISenseConfig_Hearing* HearingConfig;
	void SetupPerceptionSystem();

	UFUNCTION()
	void OnTargetPerceptionUpdated(AActor* Actor, FAIStimulus const Stimulus);
};
