//--------------------------------------------------------------------------------------
//	File	:	AVP_Behaviour_FaceHugger_StalkPrey.h
//	Created	:	29 / 06 / 07
//	Author	:	Gaz Thomas
//	Copyright (C) 2006 Rebellion, All Rights Reserved.
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
// BEGIN FILE WRAPPER
//--------------------------------------------------------------------------------------
#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif
#ifndef __AVP_BEHAVIOUR_FACEHUGGER_STALKPREY_H__
#define __AVP_BEHAVIOUR_FACEHUGGER_STALKPREY_H__ 1
//--------------------------------------------------------------------------------------
// END FILE WRAPPER
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
//	INCLUDES
//--------------------------------------------------------------------------------------
//	Axon
#include "Behaviour/BehaviourTypes/AVP_Behaviour_Shared_RouteHelper.h"

//--------------------------------------------------------------------------------------
//	FORWARD DECLARATIONS
//--------------------------------------------------------------------------------------
class AVP_Behaviour_FaceHugger;
class Axon_Project_Brain;

//--------------------------------------------------------------------------------------
//	Class	:	AVP_Behaviour_FaceHugger_StalkPrey
//	Created	:	29 / 06 / 07
//	Author	:	Gaz Thomas
//--------------------------------------------------------------------------------------
class AVP_Behaviour_FaceHugger_StalkPrey : public AVP_Behaviour_Shared_RouteHelper
{	
	typedef AVP_Behaviour_Shared_RouteHelper PARENT;

public:

	AVP_Behaviour_FaceHugger_StalkPrey( Axon_Project_Brain* pxBrain );
	virtual ~AVP_Behaviour_FaceHugger_StalkPrey();  

	enum UpdateState
	{
		US_UNSET,
		US_FIND_ROUTE_TO_TARGET,
		US_MOVE_TO_TARGET,
		NUM_UPDATE_STATES
	};

protected:

	// Overridden functions
	virtual bool		Activate();
	virtual void		Deactivate();
	virtual void		PerFrameUpdate						(const float fTimeslice);	

	void				FindRouteToTarget_PerFrameUpdate	(const float fTimeslice);
	void				MoveToTarget_PerFrameUpdate			(const float fTimeslice);

	void				SetUpdateState(UpdateState uNextState)		{m_uUpdateState = uNextState;}

#ifndef ASURA_NO_DEBUG_OUTPUT
	virtual void RenderDebugInfo();
#endif

	Asura_Vector_3		m_xMoveToPos;						//	GetRouteTo position we will use
	float				m_fOffsetDistance;					//	Distance to find a position in front of the target

private:

	//	Behaviour Common Variables
	UpdateState			m_uUpdateState;						//	Stalk Prey Behaviour Update State

};
#endif //__AVP_BEHAVIOUR_FACEHUGGER_STALKPREY_H__
