add stream separator to CombinedLifeMeterTug
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -33,6 +33,9 @@ CombinedLifeMeterTug::CombinedLifeMeterTug()
|
|||||||
}
|
}
|
||||||
m_Stream[PLAYER_2].SetZoomX( -1 );
|
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")) );
|
m_sprFrame.Load( THEME->GetPathToG(ssprintf("CombinedLifeMeterTug frame")) );
|
||||||
this->AddChild( &m_sprFrame );
|
this->AddChild( &m_sprFrame );
|
||||||
|
|
||||||
@@ -53,6 +56,10 @@ void CombinedLifeMeterTug::Update( float fDelta )
|
|||||||
m_Stream[PLAYER_1].SetPercent( GAMESTATE->m_fTugLifePercentP1 );
|
m_Stream[PLAYER_1].SetPercent( GAMESTATE->m_fTugLifePercentP1 );
|
||||||
m_Stream[PLAYER_2].SetPercent( 1-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 );
|
ActorFrame::Update( fDelta );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
MeterDisplay m_Stream[NUM_PLAYERS];
|
MeterDisplay m_Stream[NUM_PLAYERS];
|
||||||
|
Sprite m_sprSeparator;
|
||||||
Sprite m_sprFrame;
|
Sprite m_sprFrame;
|
||||||
|
|
||||||
CharacterHead m_Head[NUM_PLAYERS];
|
CharacterHead m_Head[NUM_PLAYERS];
|
||||||
|
|||||||
@@ -37,11 +37,12 @@ ScoreDisplayRave::ScoreDisplayRave()
|
|||||||
this->AddChild( &m_sprMeter[i] );
|
this->AddChild( &m_sprMeter[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->AddChild( &m_sprFrameOverlay );
|
||||||
|
|
||||||
m_textLevel.LoadFromNumbers( THEME->GetPathToN("ScoreDisplayRave level") );
|
m_textLevel.LoadFromNumbers( THEME->GetPathToN("ScoreDisplayRave level") );
|
||||||
m_textLevel.SetText( "1" );
|
m_textLevel.SetText( "1" );
|
||||||
|
m_textLevel.SetShadowLength( 0 );
|
||||||
this->AddChild( &m_textLevel );
|
this->AddChild( &m_textLevel );
|
||||||
|
|
||||||
this->AddChild( &m_sprFrameOverlay );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScoreDisplayRave::Init( PlayerNumber pn )
|
void ScoreDisplayRave::Init( PlayerNumber pn )
|
||||||
|
|||||||
Reference in New Issue
Block a user