#ifdef ASURA_USE_AXON
//////////////////////////////////////////////////////////////////////////////
//
// Axon_Behaviour_GS2Interface.h
//
// Copyright (C) 2008 Rebellion. All Rights Reserved.
//
//////////////////////////////////////////////////////////////////////////////

// B E G I N   F I L E   W R A P P E R ///////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __AXON_BEHAVIOUR_GS2INTERFACE_H__
#define __AXON_BEHAVIOUR_GS2INTERFACE_H__ 1

// E N D   F I L E   W R A P P E R ///////////////////////////////////////////

// I N C L U D E S ///////////////////////////////////////////////////////////

// asura
#include "Network/Asura_Guid.h"

// axon
#include "Behaviour/Axon_Behaviour.h"

// F O R W A R D   D E C L A R A T I O N S ///////////////////////////////////

class Axon_Behaviour_GS2Actor;
class Axon_Brain;

//////////////////////////////////////////////////////////////////////////////
//
// Axon_Behaviour_GS2Interface
// Interface through which the GS2 actor behaviour communicates with all GS2
// object behaviours.
//
//////////////////////////////////////////////////////////////////////////////

class Axon_Behaviour_GS2Interface : public Axon_Behaviour
{
	typedef Axon_Behaviour PARENT;

public:
	Axon_Behaviour_GS2Interface( const u_int uBehaviourType, Axon_Brain* pxBrain )
	: PARENT( uBehaviourType, pxBrain )
	, m_pxGSActorBehaviour( NULL )
	{}
	virtual ~Axon_Behaviour_GS2Interface() {}

	// Lets the behaviour know which gamescene actor behaviour it is associated with.
	void SetGSActorBehaviour( Axon_Behaviour_GS2Actor* pxBehaviour ) { m_pxGSActorBehaviour = pxBehaviour; }
	Axon_Behaviour_GS2Actor* GetGSActorBehaviour() const { return m_pxGSActorBehaviour; }

	// Return true if we should completely exit gamescene.
	virtual bool	   ShouldExitGamescene() { return false; }
	// Whether this behaviour wants to specify the guid of the next GS2 object to move onto. Only valid for nodes.
	// Ordinarily behaviours would leave this up to the parent GS2 Actor behaviour.
	virtual bool       HasNextGuidControl() { return false; }
	// Return the guid of the next GS2 object we should move onto. Only called if HasNextGuidControl returns true.
	virtual Asura_Guid GetNextGamesceneEntityGuid() { return ASURA_GUID_UNREGISTERED; }
	// Primarily for traversing links, when we'll most likely get to the end of the link with some timeslice remaining.
	// We then want this timeslice to be applied to movement along the next link, if there is one.
	virtual float      GetRemainingTimeslice() { return 0.0f; }

private:
	Axon_Behaviour_GS2Actor* m_pxGSActorBehaviour;
};

//////////////////////////////////////////////////////////////////////////////
//
// 
//
//////////////////////////////////////////////////////////////////////////////

#endif //__AXON_BEHAVIOUR_GS2INTERFACE_H__
#endif // ASURA_USE_AXON
