
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Vertebrate_PlayerAnimStateHandler.cpp
// Author : Will Plano
// Date   : 25/05/2008
//
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////

#include "Core/Asura.h"

// This file's header...
#include "Actor/Vertebrates/AVP_Vertebrate_PlayerAnimStateHandler.h"

#include "Core/Asura_Maths.h"
#include "Rendering/Asura_Font_System.h"

#include "Core/AVP_Game_Core.h"
#include "Entity/PhysicalObject/Actor/Vertebrates/AVP_ClientActor_Vertebrate.h"

static const char* s_aszFallingDesc[ AVP_Vertebrate_PlayerAnimStateHandler::FALLINGSTATE_END ] =
{
	"None",
	"Jumping",
	"Falling",
	"Landing"
};

AVP_Vertebrate_PlayerAnimStateHandler::AVP_Vertebrate_PlayerAnimStateHandler( AVP_ClientEntity_Actor& xClient )
: PARENT( xClient )
, m_eBestMoveSpeed(AVP_Vertebrate_PlayerAnimStateHandler::MOVESPEED_IDLE)
, m_eCurrentFallingState(AVP_Vertebrate_PlayerAnimStateHandler::FALLINGSTATE_NONE)
, m_fCrouchSpeed( 2.0f )
, m_fWalkSpeed( 2.0f )
, m_fRunSpeed( 5.0f )
, m_fSprintSpeed( 8.0f )
, m_fUBSpeedParametric( 0.0f )
{
	
}

#ifndef ASURA_NO_DEBUG_OUTPUT
void AVP_Vertebrate_PlayerAnimStateHandler::RenderDebugInfo( Asura_Vector_3& xOutputPos )
{
	PARENT::RenderDebugInfo( xOutputPos );

	Asura_Font_System::Print
	(
		xOutputPos.GetX(),
		xOutputPos.GetY(),
		0.6f,
		0xffffffff,
		ASURA_TEXTFORMAT_CENTREJUSTIFIED | ASURA_TEXTFORMAT_FORMATSTRING, 
		"Falling State: %s", s_aszFallingDesc[ m_eCurrentFallingState ]
	);
	xOutputPos.y -= 10.0f;
}
#endif

/// End of file. ///
