#ifndef _H_AI_H
#define _H_AI_H

#include <memory>
#include <string>

class GameActor;
class Raycaster;
class AIScript;

enum class AIState {
	Idle,
	Alert,
	Patrol
};

class AI {
public:
	AI(const std::shared_ptr<GameActor>& actor, const std::shared_ptr<Raycaster>& raycaster);
	void update();

	void setTarget(const std::shared_ptr<GameActor>& target) { this->target = target; }
	void attachBehaviourScript(const std::shared_ptr<AIScript>& behaviour);

	AIState getState() const { return state; }
	void setState(AIState state) { this->state = state; }

	~AI() {}

private:
	AIState						state;
	std::shared_ptr<Raycaster>	raycaster;
	std::shared_ptr<AIScript>		behaviour;
	std::shared_ptr<GameActor>	actor;
	std::shared_ptr<GameActor>	target;
};

#endif