Files
itgmania212121/stepmania/src/LifeMeterBattery.h
T

63 lines
1.4 KiB
C++
Raw Normal View History

#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 );
virtual void OnSongEnded();
2002-07-23 01:41:40 +00:00
virtual void ChangeLife( TapNoteScore score );
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();
virtual void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty) { };
2003-10-23 06:15:58 +00:00
virtual float GetLife() const;
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
};
#endif