- Timestamp:
- Apr 10, 2009, 12:05:01 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weapons/src/orxonox/objects/weaponSystem/WeaponSystem.h
r2912 r2914 40 40 namespace orxonox 41 41 { 42 const unsigned int MAX_FIRE_MODES = 8;43 44 42 class _OrxonoxExport WeaponSystem : public BaseObject 45 43 { … … 48 46 virtual ~WeaponSystem(); 49 47 50 void attachWeaponSlot(WeaponSlot * wSlot); 48 // adding and removing WeaponSlots 49 void addWeaponSlot(WeaponSlot * wSlot); 50 void removeWeaponSlot(WeaponSlot * wSlot); 51 51 WeaponSlot * getWeaponSlot(unsigned int index) const; 52 52 53 void attachWeaponSet(WeaponSet * wSet); 53 // adding and removing WeaponSets 54 bool addWeaponSet(WeaponSet * wSet); 55 bool addWeaponSet(WeaponSet * wSet, unsigned int firemode); 56 void removeWeaponSet(WeaponSet * wSet); 54 57 WeaponSet * getWeaponSet(unsigned int index) const; 55 58 56 void attachWeaponPack(WeaponPack * wPack, unsigned int wSetNumber); 59 // adding and removing WeaponPacks 60 bool canAddWeaponPack(WeaponPack * wPack); 61 bool addWeaponPack(WeaponPack * wPack); 62 void removeWeaponPack(WeaponPack * wPack); 57 63 WeaponPack * getWeaponPack(unsigned int index) const; 58 64 65 // configure slots and firemodes 66 bool swapWeaponSlots(WeaponSlot * wSlot1, WeaponSlot * wSlot2); 67 void changeWeaponmode(WeaponPack * wPack, WeaponSet * wSet, unsigned int weaponmode); 68 59 69 void fire(unsigned int firemode); 70 60 71 61 72 void setNewMunition(const std::string& munitionType, Munition * munitionToAdd); … … 71 82 { return this->weaponSlots_.size(); } 72 83 73 static inline unsigned int getMaxFireModes() 74 { return MAX_FIRE_MODES; } 75 static inline unsigned int getFireModeMask(unsigned int firemode) 84 static inline unsigned int getFiremodeMask(unsigned int firemode) 76 85 { return (0x1 << firemode); } 86 87 static const unsigned int MAX_FIRE_MODES = 8; 88 static const unsigned int FIRE_MODE_UNASSIGNED = (unsigned int)-1; 89 90 static const unsigned int MAX_WEAPON_MODES = 8; 91 static const unsigned int WEAPON_MODE_UNASSIGNED = (unsigned int)-1; 77 92 78 93 private:
Note: See TracChangeset
for help on using the changeset viewer.