Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

LifeMeterBattery.h

Go to the documentation of this file.
00001 /* LifeMeterBattery - Battery life meter used in Oni. */ 00002 00003 #ifndef LIFEMETERBATTERY_H 00004 #define LIFEMETERBATTERY_H 00005 00006 #include "LifeMeter.h" 00007 #include "Sprite.h" 00008 #include "BitmapText.h" 00009 #include "RageSound.h" 00010 #include "PercentageDisplay.h" 00011 00012 00013 class LifeMeterBattery : public LifeMeter 00014 { 00015 public: 00016 LifeMeterBattery(); 00017 00018 virtual void Load( PlayerNumber pn ); 00019 00020 virtual void Update( float fDeltaTime ); 00021 00022 virtual void OnSongEnded(); 00023 virtual void ChangeLife( TapNoteScore score ); 00024 virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore ); 00025 virtual void ChangeLife( float fDeltaLifePercent ); 00026 virtual void ChangeLifeMine(); 00027 virtual void OnDancePointsChange(); // look in GAMESTATE and update the display 00028 virtual bool IsInDanger() const; 00029 virtual bool IsHot() const; 00030 virtual bool IsFailing() const; 00031 00032 virtual void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty) { }; 00033 00034 virtual float GetLife() const; 00035 00036 void Refresh(); 00037 00038 private: 00039 int m_iLivesLeft; // dead when 0 00040 int m_iTrailingLivesLeft; // lags m_iLivesLeft 00041 00042 float m_fBatteryBlinkTime; // if > 0 battery is blinking 00043 00044 Sprite m_sprFrame; 00045 Sprite m_sprBattery; 00046 BitmapText m_textNumLives; 00047 00048 PercentageDisplay m_Percent; 00049 00050 RageSound m_soundLoseLife; 00051 RageSound m_soundGainLife; 00052 }; 00053 00054 00055 #endif 00056 00057 /* 00058 * (c) 2001-2004 Chris Danford 00059 * All rights reserved. 00060 * 00061 * Permission is hereby granted, free of charge, to any person obtaining a 00062 * copy of this software and associated documentation files (the 00063 * "Software"), to deal in the Software without restriction, including 00064 * without limitation the rights to use, copy, modify, merge, publish, 00065 * distribute, and/or sell copies of the Software, and to permit persons to 00066 * whom the Software is furnished to do so, provided that the above 00067 * copyright notice(s) and this permission notice appear in all copies of 00068 * the Software and that both the above copyright notice(s) and this 00069 * permission notice appear in supporting documentation. 00070 * 00071 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00072 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00073 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00074 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00075 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00076 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00077 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00078 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00079 * PERFORMANCE OF THIS SOFTWARE. 00080 */

Generated on Thu Jan 27 20:57:22 2005 for StepMania by doxygen 1.3.7