home *** CD-ROM | disk | FTP | other *** search
- #ifndef __Weapon_h__
- #define __Weapon_h__
-
- #include "Model.h"
- #include "Animator.h"
-
- class Vehicle;
-
- class Weapon{
- public:
- int type;
- char* name;
- Model* model;
- Vehicle* vehicle;
- vec3_t mountPoint;
- vec3_t muzzlePoint;
-
- int maxAmmo;
- int ammo;
- int ammoCosts;
- int maxEnergy;
- float energy;
- int energyCosts;
-
- unsigned long lastFiredMillis;
- unsigned long fireIntervalMillis;
-
- Animator* animator;
-
- Weapon(Vehicle* vehicle, vec3_t mountPoint);
- virtual ~Weapon();
-
- virtual void fire();
- virtual bool isReadyToFire();
-
-
- static Weapon* createWeaponForVehicle(Vehicle* vehicle, vec3_t mountPoint, int type);
- };
-
- #endif /* __Weapon_h__ */
-