//////////////////////////////////////////////////////////////////////////////
//
// ToolsAVP_Entity_Actor.h
//
// Created by NJD - 24 August 2006
//
// Copyright (C) 2006 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 __TOOLSAVP_ENTITY_ACTOR_H__
#define __TOOLSAVP_ENTITY_ACTOR_H__ 1

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

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

// tools
#include "Entity/PhysicalObject/ToolsAVP_Entity_PhysicalObject.h"

const Asura_Hash_ID uTOOLS_SHAREDPARAMHASH_ACTOR_DO_PANIC_MECHANIC = 0xFEB09606; // Asura_GetHashID("Actor_DoPanicMechanic")

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

class Asura_Entity;
class Asura_Overlay;
class Asura_Vector_2;
class AVP_ServerEntity_Actor;

//////////////////////////////////////////////////////////////////////////////
//
// ToolsAVP_Entity_Actor
//
//////////////////////////////////////////////////////////////////////////////

class ToolsAVP_Entity_Actor : public ToolsAVP_Entity_PhysicalObject
{
    typedef ToolsAVP_Entity_PhysicalObject PARENT;

public:
	virtual void Destroy();
	virtual bool GetParameter(Asura_Hash_ID uParamID, class Tools_Parameter* pxParam) const;
	virtual bool SetParameter(Asura_Hash_ID uParamID, const class Tools_Parameter* pxParam);
	virtual void Copy(const Tools_Object* pxObject);
	virtual bool IsSelectable();
	virtual void OnSelection();
	virtual void OnDeselection();
	virtual void UpdateWhileSelected();
	virtual void AddOverlayControls( Asura_Overlay* pxNewOverlay, Asura_Vector_2& xOffset );
	virtual bool HandlesThisMessage( int iMessageID );
	virtual bool HandlesThisEvent( int iEventID ) const;
	virtual void Render();
	virtual bool Verify( const bool bAutomatic );
	virtual void AddFilesToExportList( List<Asura_String>& xNameList ) const;
	virtual bool ShouldRenderShadow(){return false;}
	virtual void UpdatePositionInAsuraData( bool bUpdateLinkedObjects );

protected:
	ToolsAVP_Entity_Actor( AVP_ServerEntity_Actor* pxEntity );

	void SetNotSupportGS2();

    virtual Asura_Hash_ID GetDefaultBlueprintTypeHashID() const;
    virtual Asura_Hash_ID GetDefaultBlueprintHashID() const;
	virtual void		  SelectAnim( void );
	virtual void          RestoreMesh() {}

    static void SetInitialGamesceneNode();
	static void SetInitialGamesceneNodeToThis( Asura_Guid uGuid );
    static void ClearInitialGamesceneNode();
	static void SelectAnim_Dialog();

	static ToolsAVP_Entity_Actor* s_pxCurrentObject;

private:
	void UpdateDeadAnimation(Asura_Overlay* pxNewOverlay);
	void SetDeadSkinAndAnim();
	static bool IsActorDead();
	static void ActorDeadChanged( int iThis );

	AVP_ServerEntity_Actor*	m_pxActor;
	bool                    m_bIsDeadBody;
    bool                    m_bInitialGSNodeChanged;
	bool					m_bSupportGS2;
};

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

#endif //__TOOLSAVP_ENTITY_ACTOR_H__
