home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 March / ENTER.ISO / files / fwp-0.0.6-win32-installer.exe / Weapon.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-01-01  |  683 b   |  41 lines

  1. #ifndef __Weapon_h__
  2. #define __Weapon_h__
  3.  
  4. #include "Model.h"
  5. #include "Animator.h"
  6.  
  7. class Vehicle;
  8.  
  9. class Weapon{
  10. public:
  11.     int type;
  12.     char* name;
  13.     Model* model;
  14.     Vehicle* vehicle;
  15.     vec3_t mountPoint;
  16.     vec3_t muzzlePoint;
  17.  
  18.     int maxAmmo;
  19.     int ammo;
  20.     int ammoCosts;
  21.     int maxEnergy;
  22.     float energy;
  23.     int energyCosts;
  24.  
  25.     unsigned long lastFiredMillis;
  26.     unsigned long fireIntervalMillis;
  27.  
  28.     Animator* animator;
  29.  
  30.     Weapon(Vehicle* vehicle, vec3_t mountPoint);
  31.     virtual ~Weapon();
  32.  
  33.     virtual void fire();
  34.     virtual bool isReadyToFire();
  35.  
  36.  
  37.     static Weapon* createWeaponForVehicle(Vehicle* vehicle, vec3_t mountPoint, int type);
  38. };
  39.  
  40. #endif    /* __Weapon_h__ */
  41.