countdowntimer.h 850 B

12345678910111213141516171819202122232425262728293031323334
  1. #define VO_BOOLSIZE 18
  2. class idCountdowntimer : public idEntity
  3. {
  4. public:
  5. CLASS_PROTOTYPE( idCountdowntimer );
  6. void Spawn( void );
  7. void Save( idSaveGame *savefile ) const;
  8. void Restore( idRestoreGame *savefile );
  9. virtual void Think( void );
  10. private:
  11. int time;
  12. void Event_reset( void );
  13. void Event_start( void );
  14. void Event_hasTripped( void );
  15. int maxTime;
  16. enum { VO_5MIN, VO_4MIN, VO_3MIN, VO_2MIN, VO_1MIN, VO_45SEC, VO_30SEC, VO_10SEC, VO_9SEC, VO_8SEC, VO_7SEC, VO_6SEC, VO_5SEC, VO_4SEC, VO_3SEC, VO_2SEC, VO_1SEC };
  17. bool voBool[VO_BOOLSIZE];
  18. bool active;
  19. bool DoVO(int timeLeft, int count, int voEnum, const char *voName);
  20. bool hasTripped; //determines has this ever been run
  21. void Event_Activate( idEntity *activator );
  22. };