/*! @file weapon.h * a weapon that a player can use A Player has a list of weapons, that can be choosen to shoot projectiles (projectiles.{cc,h}) at enemies. These weapons can be shooted sequentially or (if able) combined. Therefore you can choose the weapon mode = choose a weapon. A weapon is characterized by: o firing-rate: the initial firing rate of a weapon (1/s = Herz) o slowdown-factor: this is a factor d: exp(-d*x), d is element of all positive R. it determines how fast the firing-rate will slow down. if no slowdown: d=0, the bigger d is, the faster the weapon will slow down! o energy-consumption: this determines the energy that has to be used to produce this projectile = costs per projectile Furthermore there are some other attributes, that will help to represent a firing weapon in this world: o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented o shooting animation */ #ifndef _FPS_SNIPER_RIFLE_H #define _FPS_SNIPER_RIFLE_H #include "weapon.h" //! a weapon can be left or right sided /** * @todo this will be reset with mirror X/Y/Z */ #define W_LEFT 0 #define W_RIGHT 1 class Material; class FPSSniperRifle : public Weapon { ObjectListDeclaration(FPSSniperRifle); public: FPSSniperRifle (int leftRight); FPSSniperRifle (const TiXmlElement* root); virtual ~FPSSniperRifle (); void init(); virtual void loadParams(const TiXmlElement* root); virtual void activate(); virtual void deactivate(); virtual void fire(); virtual void draw() const; private: int leftRight; //!< this will become an enum Material* material; //!< material }; #endif /* _FPS_SNIPER_RIFLE_H */