2002-11-16 08:07:38 +00:00
|
|
|
#ifndef LIFEMETERBATTERY_H
|
|
|
|
|
#define LIFEMETERBATTERY_H
|
2002-07-23 01:41:40 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: LifeMeterBattery
|
|
|
|
|
|
|
|
|
|
Desc: The battery life meter used in Oni.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "LifeMeter.h"
|
|
|
|
|
#include "Sprite.h"
|
|
|
|
|
#include "BitmapText.h"
|
2003-01-02 08:13:34 +00:00
|
|
|
#include "RageSound.h"
|
2003-10-04 08:22:09 +00:00
|
|
|
#include "PercentageDisplay.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class LifeMeterBattery : public LifeMeter
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
LifeMeterBattery();
|
|
|
|
|
|
2002-07-28 20:28:37 +00:00
|
|
|
virtual void Load( PlayerNumber pn );
|
2002-07-23 01:41:40 +00:00
|
|
|
|
|
|
|
|
virtual void Update( float fDeltaTime );
|
|
|
|
|
|
2003-01-24 02:43:07 +00:00
|
|
|
virtual void OnSongEnded();
|
2002-07-23 01:41:40 +00:00
|
|
|
virtual void ChangeLife( TapNoteScore score );
|
2002-10-12 22:04:44 +00:00
|
|
|
virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore );
|
2002-07-28 20:28:37 +00:00
|
|
|
virtual void OnDancePointsChange(); // look in GAMESTATE and update the display
|
2002-07-23 01:41:40 +00:00
|
|
|
virtual bool IsInDanger();
|
|
|
|
|
virtual bool IsHot();
|
|
|
|
|
virtual bool IsFailing();
|
|
|
|
|
|
2003-07-30 17:01:04 +00:00
|
|
|
virtual void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty) { };
|
|
|
|
|
|
2002-07-23 01:41:40 +00:00
|
|
|
void Refresh();
|
|
|
|
|
|
|
|
|
|
private:
|
2002-07-28 20:28:37 +00:00
|
|
|
int m_iLivesLeft; // dead when 0
|
|
|
|
|
int m_iTrailingLivesLeft; // lags m_iLivesLeft
|
2002-07-23 01:41:40 +00:00
|
|
|
|
|
|
|
|
float m_fBatteryBlinkTime; // if > 0 battery is blinking
|
|
|
|
|
|
|
|
|
|
Sprite m_sprFrame;
|
|
|
|
|
Sprite m_sprBattery;
|
|
|
|
|
BitmapText m_textNumLives;
|
2003-10-04 08:22:09 +00:00
|
|
|
|
|
|
|
|
PercentageDisplay m_Percent;
|
2002-07-23 01:41:40 +00:00
|
|
|
|
2003-01-02 08:13:34 +00:00
|
|
|
RageSound m_soundLoseLife;
|
|
|
|
|
RageSound m_soundGainLife;
|
2002-07-23 01:41:40 +00:00
|
|
|
};
|
|
|
|
|
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|