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

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CEngine
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    CActor
  10. //
  11. // Derived:    CShipEngine
  12. //            CCloneEngine
  13. //
  14. //-------------------------------------------------------------
  15.  
  16. #ifndef _INCLUDE_ENGINE_H
  17. #define _INCLUDE_ENGINE_H
  18.  
  19. #include "actor.h"
  20.  
  21. //-------------------------------------------------------------
  22.  
  23. const int ENGINE_MAX_THRUST = 10;
  24.  
  25. //-------------------------------------------------------------
  26.  
  27. class CEngine : public CActor
  28. {
  29.     private:
  30.         gsCVector m_offset;
  31.  
  32.     protected:
  33.  
  34.         gsCVector m_min_extent;
  35.         gsCVector m_max_extent;
  36.         float m_thrust_rate;
  37.  
  38.         gsCTimer m_thrust_timer;
  39.  
  40.         int m_thrust;
  41.  
  42.     public:
  43.         CEngine();
  44.         virtual ~CEngine();
  45.  
  46.         bool activate();
  47.  
  48.         bool update(Controls *controls);
  49.  
  50.         void applyThrust(int thrust);
  51.         void setOffset(const gsCVector& offset);
  52.  
  53.         void setParams(const gsCVector& min_extent,const gsCVector& max_extent,float thrust_rate);
  54. };
  55.  
  56. //-------------------------------------------------------------
  57.  
  58. #endif
  59.