home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / thx / demos / skyscrap / build / plane.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-13  |  1011 b   |  43 lines

  1. #ifndef __plane_h
  2. #define __plane_h
  3.  
  4. #include "object.h"
  5.  
  6. //--------------------------------------
  7. // PlaneImage
  8. // enumerations for all Plane Images
  9. //--------------------------------------
  10. enum PlaneImage
  11. {
  12.   BANK_WAY_LEFT, BANK_LEFT, NORMAL, BANK_RIGHT, BANK_WAY_RIGHT, EXPLOSION1, EXPLOSION2, EXPLOSION3
  13. };
  14.  
  15. //--------------------------------------
  16. // Ship
  17. // the base class for every ship
  18. // maintains a current image index
  19. //--------------------------------------
  20. class Plane : public Object
  21. {
  22.   // data
  23.   private:
  24.   protected:
  25.     int MaxNumShots;
  26.     boolean alive;
  27.     PlaneImage image;
  28.     int ExplosionWidth, ExplosionHeight;
  29.   public:
  30.  
  31.   // functions
  32.   private:
  33.   protected:
  34.   public:
  35.     Plane() : Object() { image=NORMAL, MaxNumShots=0; }
  36.     virtual void OnDraw(void) {};
  37.     virtual void GetNewLocation(void) {};
  38.     boolean HorizontalProximityCheck( rect me, rect stealth );
  39.     void SetStatus( boolean Alive ) { alive=Alive; }
  40. };
  41.  
  42. #endif //__plane_h
  43.