Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/weapons/weapon_slot.h @ 10530

Last change on this file since 10530 was 10440, checked in by patrick, 18 years ago

making weapons loadable

File size: 1.2 KB
Line 
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
12class Weapon;
13
14//! a class defining a Slot, where a Weapon can be stored inside.
15class WeaponSlot : public PNode
16{
17  ObjectListDeclaration(WeaponSlot);
18
19public:
20
21  WeaponSlot();
22  WeaponSlot(const TiXmlElement* root);
23  virtual ~WeaponSlot();
24
25  virtual void loadParams(const TiXmlElement* root);
26
27  void setWeaponClass();
28
29  long getCapability() { return this->capability; }
30  void setCapability(long cap) { this->capability = cap; }
31
32  inline Weapon* getCurrentWeapon() { return this->currentWeapon; }
33  inline void setCurrentWeapon(Weapon* weapon) { this->currentWeapon = weapon; }
34
35  inline Weapon* getNextWeapon() { return this->nextWeapon; }
36  inline void setNextWeapon(Weapon* weapon) { this->nextWeapon = weapon; }
37
38private:
39
40  long          capability;             //!< the capabilities of the Slot @see WeaponSlotCapability.
41
42  Weapon*       currentWeapon;          //!< The current weapon this slot is carrying.
43  Weapon*       nextWeapon;             //!< either NULL or the next weapon that will be set (require currentWeapon to deactivate)
44};
45
46
47#endif /* _WEAPON_SLOT_H */
Note: See TracBrowser for help on using the repository browser.