various overload fixes for using BGAnimation as a generic actor

This commit is contained in:
Glenn Maynard
2003-11-05 06:41:57 +00:00
parent 61bed4f9f4
commit 3fa50f03e0
+6 -3
View File
@@ -183,6 +183,7 @@ void BGAnimation::Update( float fDeltaTime )
{
for( unsigned i=0; i<m_Layers.size(); i++ )
m_Layers[i]->Update( fDeltaTime );
ActorFrame::Update( fDeltaTime );
}
void BGAnimation::DrawPrimitives()
@@ -209,22 +210,24 @@ void BGAnimation::SetDiffuse( const RageColor &c )
{
for( unsigned i=0; i<m_Layers.size(); i++ )
m_Layers[i]->SetDiffuse(c);
ActorFrame::SetDiffuse( c );
}
float BGAnimation::GetTweenTimeLeft() const
{
float tot = 0;
float ret = 0;
for( unsigned i=0; i<m_Layers.size(); ++i )
tot += m_Layers[i]->GetMaxTweenTimeLeft();
ret = max( ret, m_Layers[i]->GetMaxTweenTimeLeft() );
return tot;
return max( ret, Actor::GetTweenTimeLeft() );
}
void BGAnimation::FinishTweening()
{
for( unsigned i=0; i<m_Layers.size(); i++ )
m_Layers[i]->FinishTweening();
ActorFrame::FinishTweening();
}
void BGAnimation::PlayCommand( const CString &cmd )