Files
itgmania212121/stepmania/src/LifeMeterBattery.h
T
Glenn Maynard 064d3f2230 Pass the initial tap note score to ChangeLife for hold notes; it's needed to
handle Oni penalties correctly. (not actually doing that yet)
2002-10-12 22:04:44 +00:00

56 lines
1.3 KiB
C++

#pragma once
/*
-----------------------------------------------------------------------------
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"
#include "RageSoundSample.h"
class LifeMeterBattery : public LifeMeter
{
public:
LifeMeterBattery();
virtual void Load( PlayerNumber pn );
virtual void Update( float fDeltaTime );
virtual void SongEnded();
virtual void ChangeLife( TapNoteScore score );
virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore );
virtual void OnDancePointsChange(); // look in GAMESTATE and update the display
virtual bool IsInDanger();
virtual bool IsHot();
virtual bool IsFailing();
virtual bool FailedEarlier();
void Refresh();
private:
int m_iLivesLeft; // dead when 0
int m_iTrailingLivesLeft; // lags m_iLivesLeft
bool m_bFailedEarlier;
float m_fBatteryBlinkTime; // if > 0 battery is blinking
Sprite m_sprFrame;
Sprite m_sprBattery;
BitmapText m_textNumLives;
BitmapText m_textPercent;
RageSoundSample m_soundLoseLife;
RageSoundSample m_soundGainLife;
};