//---------------------------------------------------------------------------
// File			: AVP_Behaviour_Civilian.h
// Created		: 12 / 02 / 2008
// Created By	: Gareth Thomas
// Copyright (C) 2007 Rebellion. All Rights Reserved.
//---------------------------------------------------------------------------

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

// INCLUDES ///////////////////////////////////////////////////////////
#include "Behaviour/Axon_Project_Behaviour.h"

// FORWARD DECLARATIONS ///////////////////////////////////
class AVP_Brain_Actor_Civilian;
class AVP_ServerEntity_GamePlayVolume;

//---------------------------------------------------------------------------
// Class		: AVP_Behaviour_Civilian
// Description	: 
//---------------------------------------------------------------------------
class AVP_Behaviour_Civilian : public Axon_Project_Behaviour
{
	typedef Axon_Project_Behaviour PARENT;

public:

	// Civilian Update State Enum
	enum CivilianUpdateState
	{
		UNSET,
		IDLE,
		ALERT,
		PANIC,
		PATROL,
		WANDER,
		ATTACK,
		GRAPPLE,
		ON_LIFT,
		MAX_STATES
	};

	// Construction / Deconstruction
	AVP_Behaviour_Civilian										(AVP_Brain_Actor_Civilian* pxBrain);
	virtual ~AVP_Behaviour_Civilian								(void) {}

	// Public Member Virtual Functions...
	virtual bool 					Activate					(void);
	virtual void 					Deactivate					(void);
	virtual void 					Update						(const float fTimeslice);
	virtual bool					HandleMessage				(const Asura_Message* pxMessage);

#ifndef ASURA_NO_DEBUG_OUTPUT
	virtual void					RenderDebugInfo				(void);
#endif

	// Public Member Functions...
	CivilianUpdateState				GetUpdateState				(void) const					{return m_eUpdateState;}
	AVP_Brain_Actor_Civilian*		GetCivilianBrain			(void)							{return m_pxCivilianBrain;}
	

protected:

	void							SetUpdateState				(CivilianUpdateState eState)	{m_eUpdateState = eState;}
	bool							IsChildBeahviourFinished	(void);
	void							CheckForIdleAction			(void);
	void							UpdateAlert					(void);

private:

	// Private Member Variables...
	CivilianUpdateState				m_eUpdateState;
	AVP_Brain_Actor_Civilian*		m_pxCivilianBrain;

	enum { CURRENT_CHUNK_VERSION = 0 };

};

#endif //__AVP_BEHAVIOUR_CIVILIAN_H__

/// End Of File 'AVP_Behaviour_Civilian.h'
