show cumulative calorie number
This commit is contained in:
@@ -36,6 +36,8 @@ void ScoreDisplayCalories::LoadFromNode( const CString& sDir, const XNode* pNode
|
|||||||
|
|
||||||
m_sMessageOnStep = ssprintf("StepP%d",m_PlayerNumber+1);
|
m_sMessageOnStep = ssprintf("StepP%d",m_PlayerNumber+1);
|
||||||
|
|
||||||
|
UpdateNumber();
|
||||||
|
|
||||||
MESSAGEMAN->Subscribe( this, m_sMessageOnStep );
|
MESSAGEMAN->Subscribe( this, m_sMessageOnStep );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,13 +45,19 @@ void ScoreDisplayCalories::PlayCommand( const CString &sCommandName )
|
|||||||
{
|
{
|
||||||
if( sCommandName == m_sMessageOnStep )
|
if( sCommandName == m_sMessageOnStep )
|
||||||
{
|
{
|
||||||
float fCals = STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].fCaloriesBurned;
|
UpdateNumber();
|
||||||
this->SetTargetNumber( fCals );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RollingNumbers::PlayCommand( sCommandName );
|
RollingNumbers::PlayCommand( sCommandName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScoreDisplayCalories::UpdateNumber()
|
||||||
|
{
|
||||||
|
float fCals = STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].fCaloriesBurned;
|
||||||
|
fCals += STATSMAN->GetAccumStageStats().m_player[m_PlayerNumber].fCaloriesBurned;
|
||||||
|
SetTargetNumber( fCals );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford
|
* (c) 2001-2004 Chris Danford
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ public:
|
|||||||
|
|
||||||
void PlayCommand( const CString &sCommandName );
|
void PlayCommand( const CString &sCommandName );
|
||||||
|
|
||||||
|
void UpdateNumber();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Commands
|
// Commands
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user