#include "Core/Asura.h"

#ifdef AVP_USE_INPUT_SIMULATOR

#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif

#ifndef __AVP_INPUTSIMULATOR_BEHAVIOUR_PREDATOR_HUNT_H__
#define __AVP_INPUTSIMULATOR_BEHAVIOUR_PREDATOR_HUNT_H__

#include "Core/AVP_Navigation.h"
#include "Entity/PhysicalObject/Actor/AVP_ClientEntity_Actor.h"
#include "InputSimulator/AVP_InputSimulator_Behaviour.h"

// This behaviour seeks for the enemy targets. If a enemy is found, we tries to attack it.

class AVP_InputSimulator_Behaviour_Predator_Hunt : public AVP_InputSimulator_Behaviour
{
	public:
		AVP_InputSimulator_Behaviour_Predator_Hunt();

		void Update( u_char* ucCurrentInput, float* pfAxisValue );

	private:
		bool SpotAndAttackTarget( u_char* ucCurrentInput, float* pfAxisValue );
		
		enum UpdateState
		{
			SPOT_AND_ATTACK_TARGET,
			NOT_SET
		};
		
		void SetUpdateState( UpdateState eState ) { m_eUpdateState = eState; };
	private:
		AVP_ClientEntity_Actor* GetPlayer();

		UpdateState m_eUpdateState;
		Asura_Guid	m_uTargetGuid;
};

#endif // __AVP_INPUTSIMULATOR_BEHAVIOUR_PREDATOR_HUNT_H__

#endif // AVP_USE_INPUT_SIMULATOR
