home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / demo2 / playgamestate.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-12  |  1.1 KB  |  62 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CPlayGameState
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    CGameState
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #ifndef _INCLUDE_PLAYGAMESTATE_H
  16. #define _INCLUDE_PLAYGAMESTATE_H
  17.  
  18. #include "gamestate.h"
  19.  
  20. //-------------------------------------------------------------
  21.  
  22. const int PLAYER_START_OFFSET = 64;        // offset from bottom of screen
  23.  
  24. //-------------------------------------------------------------
  25.  
  26. class CPlayGameState : public CGameState
  27. {
  28.     private:
  29.  
  30.         static CPlayGameState *m_instance;
  31.  
  32.         void setLayerPositions(int ship_y);
  33.  
  34.         CShip *m_ship;
  35.  
  36.         enum {
  37.             CREATEPLAYER,
  38.             PLAYERACTIVE,
  39.         } m_mode;
  40.  
  41.         static int m_yscroll;
  42.  
  43.     public:
  44.         CPlayGameState();
  45.         ~CPlayGameState();
  46.  
  47.         static CGameState *instance();
  48.         
  49.         bool create();
  50.         bool update();
  51.         bool destroy();
  52.  
  53.         void createPlayer();
  54.  
  55.         static int getYScroll();
  56. };
  57.  
  58. //-------------------------------------------------------------
  59.  
  60. #endif
  61.  
  62.