30 #ifndef _WeaponSystem_H__ 31 #define _WeaponSystem_H__ 56 WeaponSlot * getWeaponSlot(
unsigned int index)
const;
58 {
return weaponSlots_; }
62 bool addWeaponSet(
WeaponSet * wSet,
unsigned int firemode);
64 WeaponSet * getWeaponSet(
unsigned int index)
const;
70 WeaponPack * getWeaponPack(
unsigned int index)
const;
72 {
return weaponPacks_; }
78 void fire(
unsigned int firemode);
82 void addMunition(
Munition* munition);
85 { this->pawn_ = pawn; }
87 {
return this->pawn_; }
90 {
return this->weaponSlots_.size(); }
93 {
return (0x1 << firemode); }
95 static const unsigned int MAX_FIRE_MODES = 8;
96 static const unsigned int FIRE_MODE_UNASSIGNED =
static_cast<unsigned int>(-1);
98 static const unsigned int MAX_WEAPON_MODES = 8;
99 static const unsigned int WEAPON_MODE_UNASSIGNED =
static_cast<unsigned int>(-1);
102 void updateMunition();
The BaseObject is the parent of all classes representing an instance in the game. ...
Definition: BaseObject.h:63
Everything in Orxonox that has a health attribute is a Pawn.
Definition: Pawn.h:56
The a WeaponSlot defines where a Weapon is placed on a pawn.
Definition: WeaponSlot.h:59
void setPawn(Pawn *pawn)
Definition: WeaponSystem.h:84
Definition: Munition.h:48
std::map< unsigned int, WeaponSet * > weaponSets_
Definition: WeaponSystem.h:104
std::vector< WeaponSlot * > weaponSlots_
Definition: WeaponSystem.h:105
Definition: WeaponSet.h:40
std::map< Identifier *, Munition * > munitions_
Definition: WeaponSystem.h:107
An orxonox::Pawn that is able to fire weapons always need to have a WeaponSystem. ...
Definition: WeaponSystem.h:47
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
const std::vector< WeaponSlot * > & getAllWeaponSlots() const
Definition: WeaponSystem.h:57
Definition: WeaponPack.h:40
static unsigned int getFiremodeMask(unsigned int firemode)
Definition: WeaponSystem.h:92
Shared library macros, enums, constants and forward declarations for the orxonox library ...
int getWeaponSlotSize() const
Definition: WeaponSystem.h:89
Declaration of BaseObject, the base class of all objects in Orxonox.
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
const std::vector< WeaponPack * > & getAllWeaponPacks() const
Definition: WeaponSystem.h:71
std::vector< WeaponPack * > weaponPacks_
Definition: WeaponSystem.h:106
Pawn * getPawn() const
Definition: WeaponSystem.h:86
The SubclassIdentifier acts almost like an Identifier, but has some prerequisites.
Definition: SubclassIdentifier.h:90
Pawn * pawn_
Definition: WeaponSystem.h:108