Rev | Line | |
---|
[10437] | 1 | /*! |
---|
| 2 | * @file weapon_slot.h |
---|
| 3 | */ |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | #ifndef _WEAPON_SLOT_H |
---|
| 7 | #define _WEAPON_SLOT_H |
---|
| 8 | |
---|
| 9 | #include "p_node.h" |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | class Weapon; |
---|
| 13 | |
---|
| 14 | //! a class defining a Slot, where a Weapon can be stored inside. |
---|
| 15 | class WeaponSlot : public PNode |
---|
| 16 | { |
---|
| 17 | ObjectListDeclaration(WeaponSlot); |
---|
| 18 | |
---|
| 19 | public: |
---|
| 20 | |
---|
| 21 | WeaponSlot(); |
---|
| 22 | WeaponSlot(const TiXmlElement* root); |
---|
| 23 | virtual ~WeaponSlot(); |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | long getCapability() { return this->capability; } |
---|
| 27 | void setCapability(long cap) { this->capability = cap; } |
---|
| 28 | |
---|
| 29 | inline Weapon* getCurrentWeapon() { return this->currentWeapon; } |
---|
| 30 | inline void setCurrentWeapon(Weapon* weapon) { this->currentWeapon = weapon; } |
---|
| 31 | |
---|
| 32 | inline Weapon* getNextWeapon() { return this->nextWeapon; } |
---|
| 33 | inline void setNextWeapon(Weapon* weapon) { this->nextWeapon = weapon; } |
---|
| 34 | |
---|
| 35 | // private: |
---|
| 36 | |
---|
| 37 | long capability; //!< the capabilities of the Slot @see WeaponSlotCapability. |
---|
| 38 | |
---|
| 39 | Weapon* currentWeapon; //!< The current weapon this slot is carrying. |
---|
| 40 | Weapon* nextWeapon; //!< either NULL or the next weapon that will be set (require currentWeapon to deactivate) |
---|
| 41 | }; |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | #endif /* _WEAPON_SLOT_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.