- Timestamp:
- Apr 9, 2009, 3:18:11 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapons/src/orxonox/objects/weaponSystem/WeaponPack.h
r2893 r2912 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #include <vector> 36 35 37 #include "core/BaseObject.h" 36 37 #include "Weapon.h"38 39 38 40 39 namespace orxonox … … 50 49 void fire(); 51 50 52 Weapon * getWeaponPointer(unsigned int n) ;53 int getSize() ;51 Weapon * getWeaponPointer(unsigned int n) const; 52 int getSize() const; 54 53 55 54 void setFireMode(unsigned int firemode); 56 unsigned int getFireMode() ;55 unsigned int getFireMode() const; 57 56 58 57 void addWeapon(Weapon * weapon); 59 const Weapon * getWeapon(unsigned int index); 58 const Weapon * getWeapon(unsigned int index) const; 59 60 void attachNeededMunitionToAllWeapons(); 60 61 61 62 //functions with effect to all weapons of the weaponPack 62 63 //functions needed for creating Pointer to the right objects (-->Pawn.cc) 63 void setParentWeaponSystemToAllWeapons(WeaponSystem * weaponSystem); 64 void attachNeededMunitionToAllWeapons(); 65 66 inline void setParentWeaponSystem(WeaponSystem *parentWeaponSystem) 67 { parentWeaponSystem_=parentWeaponSystem; } 68 inline WeaponSystem * getParentWeaponSystem() 69 { return parentWeaponSystem_; } 64 inline void setWeaponSystem(WeaponSystem *weaponSystem) 65 { this->weaponSystem_ = weaponSystem; this->setWeaponSystemToAllWeapons(weaponSystem); } 66 inline WeaponSystem * getWeaponSystem() const 67 { return this->weaponSystem_; } 70 68 71 69 private: 70 void setWeaponSystemToAllWeapons(WeaponSystem * weaponSystem); 71 72 72 std::vector<Weapon *> weapons_; 73 WeaponSystem * parentWeaponSystem_;73 WeaponSystem *weaponSystem_; 74 74 unsigned int firemode_; 75 75 };
Note: See TracChangeset
for help on using the changeset viewer.