70 unsigned int getNumMunition(
WeaponMode* user)
const;
71 unsigned int getNumMunitionInCurrentMagazine(
WeaponMode* user)
const;
72 unsigned int getNumMagazines()
const;
74 unsigned int getMaxMunition()
const;
76 {
return this->maxMagazines_; }
78 {
return this->maxMunitionPerMagazine_; }
80 {
return deployment_; }
83 bool canTakeMunition(
unsigned int amount,
WeaponMode* user)
const;
84 bool takeMunition(
unsigned int amount,
WeaponMode* user);
86 bool canReload()
const;
88 bool reload(
WeaponMode* user,
bool bUseReloadTime =
true);
90 {
return this->reloadTime_; }
92 bool canAddMunition(
unsigned int amount)
const;
93 bool addMunition(
unsigned int amount);
95 bool canAddMagazines(
unsigned int amount)
const;
101 unsigned int addMagazines(
unsigned int amount);
103 bool canRemoveMagazines(
unsigned int amount)
const;
104 bool removeMagazines(
unsigned int amount);
125 { this->maxMagazines_ = maxMagazines; }
127 { this->maxMunitionPerMagazine_ = maxMunitionPerMagazine; }
128 void setNumMagazines(
unsigned int numMagazines);
The BaseObject is the parent of all classes representing an instance in the game. ...
Definition: BaseObject.h:63
MunitionDeployment getMunitionDeployment() const
Definition: Munition.h:79
MunitionDeployment deployment_
Definition: Munition.h:114
unsigned int munition_
Definition: Munition.h:56
Definition: Munition.h:48
void setMaxMagazines(unsigned int maxMagazines)
Definition: Munition.h:124
Definition: Munition.h:50
bool bLoaded_
Definition: Munition.h:58
bool bAllowMunitionRefilling_
Definition: Munition.h:116
Timer loadTimer_
Definition: Munition.h:57
void setMaxMunitionPerMagazine(unsigned int maxMunitionPerMagazine)
Definition: Munition.h:126
xmlelement
Definition: Super.h:519
A WeaponMode defines how a Weapon is used.
Definition: WeaponMode.h:49
Declaration of the Timer class, used to call functions after a given time-interval.
unsigned int maxMagazines_
Definition: Munition.h:110
MunitionDeployment
Definition: Munition.h:41
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
unsigned int maxMunitionPerMagazine_
Definition: Munition.h:109
Mode
Definition: CorePrereqs.h:102
unsigned int getMaxMagazines() const
Definition: Munition.h:75
Shared library macros, enums, constants and forward declarations for the orxonox library ...
Declaration of BaseObject, the base class of all objects in Orxonox.
virtual ~Magazine()
Definition: Munition.h:54
std::map< WeaponMode *, Magazine * > assignedMagazines_
Definition: Munition.h:112
unsigned int unassignedMagazines_
Definition: Munition.h:111
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
bool bAllowMultiMunitionRemovementUnderflow_
Definition: Munition.h:117
float getReloadTime() const
Definition: Munition.h:89
float reloadTime_
Definition: Munition.h:119
unsigned int getMaxMunitionPerMagazine() const
Definition: Munition.h:77
Timer is a helper class that executes a function after a given amount of seconds in game-time...
Definition: Timer.h:105
WeaponMode * lastFilledWeaponMode_
Definition: Munition.h:120