simplify, more consistent

This commit is contained in:
Glenn Maynard
2006-11-09 09:47:44 +00:00
parent 97894cfb47
commit efdcb63f1b
2 changed files with 1 additions and 10 deletions
+1 -9
View File
@@ -264,14 +264,6 @@ void LifeMeterBar::AfterLifeChanged()
m_pStream->SetPercent( m_fLifePercentage );
}
bool LifeMeterBar::IsPastPassmark() const
{
if( m_pPlayerState->m_PlayerOptions.GetSong().m_fPassmark > 0 )
return m_fLifePercentage >= m_pPlayerState->m_PlayerOptions.GetSong().m_fPassmark;
else
return false;
}
bool LifeMeterBar::IsHot() const
{
return m_fLifePercentage >= 1;
@@ -292,7 +284,7 @@ void LifeMeterBar::Update( float fDeltaTime )
{
LifeMeter::Update( fDeltaTime );
m_fPassingAlpha += IsPastPassmark() ? +fDeltaTime*2 : -fDeltaTime*2;
m_fPassingAlpha += !IsFailing() ? +fDeltaTime*2 : -fDeltaTime*2;
CLAMP( m_fPassingAlpha, 0, 1 );
m_fHotAlpha += IsHot() ? + fDeltaTime*2 : -fDeltaTime*2;
-1
View File
@@ -23,7 +23,6 @@ public:
virtual void ChangeLife( float fDeltaLifePercent );
virtual void AfterLifeChanged();
virtual bool IsInDanger() const;
virtual bool IsPastPassmark() const;
virtual bool IsHot() const;
virtual bool IsFailing() const;
virtual float GetLife() const { return m_fLifePercentage; }