Rev | Line | |
---|
[6113] | 1 | /*! |
---|
| 2 | * @file weapon_power_up.h |
---|
| 3 | * @brief A class representing a PowerUp containing a weapon. |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _WEAPON_POWER_UP_H |
---|
| 7 | #define _WEAPON_POWER_UP_H |
---|
| 8 | |
---|
| 9 | #include "power_up.h" |
---|
| 10 | #include "weapons/weapon.h" |
---|
[6973] | 11 | #include "weapons/weapon_manager.h" |
---|
[6113] | 12 | |
---|
| 13 | /* FORWARD DEFINITION */ |
---|
| 14 | |
---|
| 15 | class WeaponPowerUp : public PowerUp { |
---|
| 16 | |
---|
| 17 | public: |
---|
[7065] | 18 | WeaponPowerUp(const TiXmlElement* root = NULL); |
---|
[6113] | 19 | virtual ~WeaponPowerUp (); |
---|
| 20 | |
---|
[6512] | 21 | virtual void loadParams(const TiXmlElement* root); |
---|
| 22 | |
---|
[6113] | 23 | Weapon* getWeapon(); |
---|
[7221] | 24 | void setWeaponClass(const std::string& name); |
---|
[6113] | 25 | |
---|
[6424] | 26 | virtual int writeBytes(const byte* data, int length, int sender); |
---|
| 27 | virtual int readBytes(byte* data, int maxLength, int * reciever ); |
---|
| 28 | |
---|
[6973] | 29 | bool process(WeaponManager* manager); |
---|
[6113] | 30 | |
---|
| 31 | private: |
---|
| 32 | void init(); |
---|
[6973] | 33 | void newWeapon(); |
---|
[6113] | 34 | private: |
---|
| 35 | Weapon* weapon; |
---|
| 36 | const TiXmlElement* weaponXML; |
---|
| 37 | |
---|
| 38 | void createWeapon(); |
---|
| 39 | }; |
---|
| 40 | |
---|
| 41 | #endif /* _WEAPON_POWER_UP_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.