00001 /* CombinedLifeMeterTug - Dance Magic-like tug-o-war life meter. */ 00002 00003 #ifndef CombinedLifeMeterTug_H 00004 #define CombinedLifeMeterTug_H 00005 00006 #include "CombinedLifeMeter.h" 00007 #include "Sprite.h" 00008 #include "MeterDisplay.h" 00009 #include "CharacterHead.h" 00010 00011 00012 class CombinedLifeMeterTug : public CombinedLifeMeter 00013 { 00014 public: 00015 CombinedLifeMeterTug(); 00016 virtual void Update( float fDelta ); 00017 00018 virtual void ChangeLife( PlayerNumber pn, TapNoteScore score ); 00019 virtual void ChangeLife( PlayerNumber pn, HoldNoteScore score, TapNoteScore tscore ); 00020 virtual void ChangeLifeMine( PlayerNumber pn ); 00021 virtual void OnDancePointsChange( PlayerNumber pn ) {}; 00022 virtual bool IsInDanger( PlayerNumber pn ) { return false; }; 00023 virtual bool IsHot( PlayerNumber pn ) { return false; }; 00024 virtual bool IsFailing( PlayerNumber pn ) { return false; }; 00025 00026 protected: 00027 void ChangeLife( PlayerNumber pn, float fPercentToMove ); 00028 00029 MeterDisplay m_Stream[NUM_PLAYERS]; 00030 Sprite m_sprSeparator; 00031 Sprite m_sprFrame; 00032 00033 CharacterHead m_Head[NUM_PLAYERS]; 00034 }; 00035 00036 #endif 00037 00038 /* 00039 * (c) 2003-2004 Chris Danford 00040 * All rights reserved. 00041 * 00042 * Permission is hereby granted, free of charge, to any person obtaining a 00043 * copy of this software and associated documentation files (the 00044 * "Software"), to deal in the Software without restriction, including 00045 * without limitation the rights to use, copy, modify, merge, publish, 00046 * distribute, and/or sell copies of the Software, and to permit persons to 00047 * whom the Software is furnished to do so, provided that the above 00048 * copyright notice(s) and this permission notice appear in all copies of 00049 * the Software and that both the above copyright notice(s) and this 00050 * permission notice appear in supporting documentation. 00051 * 00052 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00053 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00054 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00055 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00056 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00057 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00058 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00059 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00060 * PERFORMANCE OF THIS SOFTWARE. 00061 */