Beispiel #1
0
RemainingTargets::RemainingTargets(Object2D* parent, SceneGraph::DrawableGroup2D* drawables, SceneGraph::AnimableGroup2D* animables): AbstractHudText(parent, drawables), SceneGraph::Animable2D(*this, animables) {
    (text = new Text::Renderer2D(*font, *glyphCache, 0.06f, Text::Alignment::LineLeft))
        ->reserve(32, BufferUsage::DynamicDraw, BufferUsage::StaticDraw);

    setDuration(0.4f);
    setRepeated(true);
    setRepeatCount(2);

    translate({-1.303f, -0.97f});
}
bool CJustModelAVT::SetMotion( int iMotionIDX ,int iRepeatCount )
{
	tagMOTION *pMOTION = g_MotionFILE.IDX_GetMOTION( iMotionIDX, m_bIsFemale );
	if ( !pMOTION ) 
	{
		return false;	
	}

	::attachMotion		( m_hNodeMODEL, pMOTION->m_hMotion );
	if( iRepeatCount )
		setRepeatCount ( m_hNodeMODEL, iRepeatCount );

	return true;
}
bool CJustModelAVT::SetMotion( const char* strMotion, int iRepeatCount )
{
	if( strMotion == NULL )
		return false;

	unsigned int uiKEY = CStr::GetHASH( strMotion );

	HNODE hMotion = g_MotionFILE.KEY_GetZMOTION( uiKEY );
	if ( !hMotion ) 
	{
		return false;
	}

	::attachMotion		( m_hNodeMODEL, hMotion );
	if( iRepeatCount )
		setRepeatCount ( m_hNodeMODEL, iRepeatCount );

	return true;
}