home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / xenon / includes / player.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-01  |  1.0 KB  |  60 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CPlayer
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    None
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #ifndef _INCLUDE_PLAYER_H
  16. #define _INCLUDE_PLAYER_H
  17.  
  18. #include "gamesystem.h"
  19.  
  20. //-------------------------------------------------------------
  21.  
  22. const int INITIAL_LIVES = 3;
  23. const int MAX_LIVES = 10;
  24.  
  25. //-------------------------------------------------------------
  26.  
  27. class CPlayer
  28. {
  29.     private:
  30.         int m_lives;
  31.         int m_score;
  32.         bool m_has_dive_pickup;
  33.  
  34.         gsCVector m_checkpoint;
  35.  
  36.         static int m_extra_life_scores[];
  37.  
  38.     public:
  39.         CPlayer();
  40.         ~CPlayer();
  41.  
  42.         int getScore();
  43.         void scoreBonus(int bonus);
  44.  
  45.         int getLives();
  46.         void extraLife();
  47.         void loseLife();
  48.  
  49.         void diveBonus();
  50.         bool hasDive();
  51.         void useDive();
  52.  
  53.         void setCheckpoint(const gsCVector& checkpoint);
  54.         gsCVector getCheckpoint();
  55. };
  56.  
  57. //-------------------------------------------------------------
  58.  
  59. #endif
  60.