/*! @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 _TEST_GUN_H #define _TEST_GUN_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 TestGun : public Weapon { ObjectListDeclaration(TestGun); public: TestGun (int leftRight); TestGun (const TiXmlElement* root); virtual ~TestGun (); void init(); virtual void loadParams(const TiXmlElement* root); virtual void activate(); virtual void deactivate(); virtual void fire(); virtual void draw() const; private: PNode* objectComponent1; //