00001 #ifndef LIFE_METER_H 00002 #define LIFE_METER_H 00003 00004 #include "PlayerNumber.h" 00005 #include "GameConstantsAndTypes.h" 00006 #include "ActorFrame.h" 00007 00008 00009 class LifeMeter : public ActorFrame 00010 { 00011 public: 00012 LifeMeter() {}; 00013 virtual ~LifeMeter() {}; 00014 00015 virtual void Load( PlayerNumber pn ) { m_PlayerNumber = pn; } 00016 virtual void OnSongEnded() {}; 00017 /* Change life after receiving a tap note grade. This *is* called for 00018 * the head of hold notes. */ 00019 virtual void ChangeLife( TapNoteScore score ) = 0; 00020 /* Change life after receiving a hold note grade. tscore is the score 00021 * received for the initial tap note. */ 00022 virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore ) = 0; 00023 virtual void ChangeLifeMine() = 0; 00024 virtual void OnDancePointsChange() = 0; // look in GAMESTATE and update the display 00025 virtual bool IsInDanger() const = 0; 00026 virtual bool IsHot() const = 0; 00027 virtual bool IsFailing() const = 0; 00028 00029 virtual float GetLife() const { return 0; } // for cosmetic use only 00030 virtual void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty) = 0; 00031 00032 protected: 00033 PlayerNumber m_PlayerNumber; 00034 }; 00035 00036 00037 #endif 00038 00039 /* 00040 * (c) 2001-2003 Chris Danford 00041 * All rights reserved. 00042 * 00043 * Permission is hereby granted, free of charge, to any person obtaining a 00044 * copy of this software and associated documentation files (the 00045 * "Software"), to deal in the Software without restriction, including 00046 * without limitation the rights to use, copy, modify, merge, publish, 00047 * distribute, and/or sell copies of the Software, and to permit persons to 00048 * whom the Software is furnished to do so, provided that the above 00049 * copyright notice(s) and this permission notice appear in all copies of 00050 * the Software and that both the above copyright notice(s) and this 00051 * permission notice appear in supporting documentation. 00052 * 00053 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00054 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00055 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00056 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00057 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00058 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00059 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00060 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00061 * PERFORMANCE OF THIS SOFTWARE. 00062 */