varying lifebar amounts for HowToPlay screen
This commit is contained in:
@@ -707,3 +707,15 @@ void LifeStream::DrawPrimitives()
|
|||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void LifeMeterBar::FillForHowToPlay(int NumPerfects, int NumMisses)
|
||||||
|
{
|
||||||
|
m_iProgressiveLifebar = 0; // disable progressive lifebar
|
||||||
|
|
||||||
|
float AmountForPerfect = NumPerfects * m_fLifeDifficulty * 0.008f;
|
||||||
|
float AmountForMiss = NumMisses / m_fLifeDifficulty * 0.08f;
|
||||||
|
|
||||||
|
m_fLifePercentage = AmountForMiss - AmountForPerfect;
|
||||||
|
CLAMP( m_fLifePercentage, 0.0f, 1.0f );
|
||||||
|
AfterLifeChanged();
|
||||||
|
}
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ public:
|
|||||||
virtual bool FailedEarlier();
|
virtual bool FailedEarlier();
|
||||||
|
|
||||||
void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty);
|
void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty);
|
||||||
|
void FillForHowToPlay(int NumPerfects, int NumMisses);
|
||||||
|
// this function is solely for HowToPlay
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ResetBarVelocity();
|
void ResetBarVelocity();
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
|
|||||||
m_LifeMeterBar.SetXY( 480, 40 );
|
m_LifeMeterBar.SetXY( 480, 40 );
|
||||||
// we need to be a little lower than half if we want to hit
|
// we need to be a little lower than half if we want to hit
|
||||||
// zero with the actual miss steps. cheat.
|
// zero with the actual miss steps. cheat.
|
||||||
m_LifeMeterBar.ChangeLife(TNS_MISS);
|
// m_LifeMeterBar.ChangeLife(TNS_MISS);
|
||||||
|
// nicer fix :P it depends on difficulty
|
||||||
|
m_LifeMeterBar.FillForHowToPlay(4, 6);
|
||||||
|
|
||||||
// Display random character+pad
|
// Display random character+pad
|
||||||
if( GAMESTATE->m_pCharacters.size() )
|
if( GAMESTATE->m_pCharacters.size() )
|
||||||
|
|||||||
Reference in New Issue
Block a user