add stream separator to CombinedLifeMeterTug

This commit is contained in:
Chris Danford
2003-11-27 08:02:36 +00:00
parent b716ee6680
commit 4343594040
4 changed files with 12 additions and 3 deletions
+7
View File
@@ -33,6 +33,9 @@ CombinedLifeMeterTug::CombinedLifeMeterTug()
}
m_Stream[PLAYER_2].SetZoomX( -1 );
m_sprSeparator.Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug separator")) );
this->AddChild( &m_sprSeparator );
m_sprFrame.Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug frame")) );
this->AddChild( &m_sprFrame );
@@ -53,6 +56,10 @@ void CombinedLifeMeterTug::Update( float fDelta )
m_Stream[PLAYER_1].SetPercent( GAMESTATE->m_fTugLifePercentP1 );
m_Stream[PLAYER_2].SetPercent( 1-GAMESTATE->m_fTugLifePercentP1 );
float fSeparatorX = SCALE( GAMESTATE->m_fTugLifePercentP1, 0.f, 1.f, -METER_WIDTH/2.f, +METER_WIDTH/2.f );
m_sprSeparator.SetX( fSeparatorX );
ActorFrame::Update( fDelta );
}