Files
itgmania212121/stepmania/src/LifeMeterBar.h
T

52 lines
1.3 KiB
C++
Raw Normal View History

2002-04-28 20:42:32 +00:00
#pragma once
/*
-----------------------------------------------------------------------------
Class: LifeMeterBar
Desc: A graphic displayed in the LifeMeterBar during Dancing.
2002-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-04-28 20:42:32 +00:00
Chris Danford
-----------------------------------------------------------------------------
*/
2002-05-19 01:59:48 +00:00
#include "LifeMeter.h"
2002-04-28 20:42:32 +00:00
#include "Sprite.h"
2002-05-19 01:59:48 +00:00
#include "Quad.h"
class LifeMeterStream;
2002-04-28 20:42:32 +00:00
2002-05-19 01:59:48 +00:00
class LifeMeterBar : public LifeMeter
2002-04-28 20:42:32 +00:00
{
public:
LifeMeterBar();
~LifeMeterBar();
2002-04-28 20:42:32 +00:00
2002-07-28 20:28:37 +00:00
virtual void Load( PlayerNumber pn );
2002-07-23 01:41:40 +00:00
2002-04-28 20:42:32 +00:00
virtual void Update( float fDeltaTime );
2002-05-19 01:59:48 +00:00
virtual void DrawPrimitives();
2002-04-28 20:42:32 +00:00
2002-05-19 01:59:48 +00:00
virtual void ChangeLife( TapNoteScore score );
virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore );
virtual void AfterLifeChanged();
2002-07-28 20:28:37 +00:00
virtual void OnDancePointsChange() {}; // this life meter doesn't care
2002-06-24 22:04:31 +00:00
virtual bool IsInDanger();
virtual bool IsHot();
2002-07-23 01:41:40 +00:00
virtual bool IsFailing();
virtual bool FailedEarlier();
2002-04-28 20:42:32 +00:00
private:
2002-05-27 08:23:27 +00:00
void ResetBarVelocity();
2002-04-28 20:42:32 +00:00
2002-07-23 01:41:40 +00:00
Quad m_quadBlackBackground;
LifeMeterStream* m_pStream;
2002-07-23 01:41:40 +00:00
2002-04-28 20:42:32 +00:00
float m_fLifePercentage;
float m_fTrailingLifePercentage; // this approaches m_fLifePercentage
float m_fLifeVelocity;
2002-07-23 01:41:40 +00:00
float m_fHotAlpha;
bool m_bFailedEarlier; // set this to true when life dips below 0
2002-04-28 20:42:32 +00:00
};