Files
itgmania212121/stepmania/src/LifeMeterBattery.h
T

59 lines
1.3 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"
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 bool FailedEarlier();
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
bool m_bFailedEarlier;
float m_fBatteryBlinkTime; // if > 0 battery is blinking
Sprite m_sprFrame;
Sprite m_sprBattery;
BitmapText m_textNumLives;
BitmapText m_textPercent;
2003-01-02 08:13:34 +00:00
RageSound m_soundLoseLife;
RageSound m_soundGainLife;
2002-07-23 01:41:40 +00:00
};
#endif