Changeset 10648
- Timestamp:
- Oct 12, 2015, 6:28:15 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/data/levels/includes/weaponSettingsAssff.oxi
r10622 r10648 25 25 </attached> 26 26 <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" /> 27 <EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare" muzzleoffset="2,-0.2,-1" />28 27 <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" /> 29 28 <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 /> … … 44 43 </Weapon> 45 44 </WeaponPack> 46 <WeaponPack>47 <links>48 <DefaultWeaponmodeLink firemode=1 weaponmode=0 />49 </links>50 <!--Weapon>51 <EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />52 </Weapon-->53 </WeaponPack>54 45 </weapons> -
code/trunk/data/levels/includes/weaponSettingsAssff2.oxi
r8706 r10648 45 45 </Weapon> 46 46 </WeaponPack> 47 <WeaponPack>48 <links>49 <DefaultWeaponmodeLink firemode=1 weaponmode=0 />50 </links>51 <!--Weapon>52 <EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />53 </Weapon-->54 </WeaponPack>55 47 </weapons> -
code/trunk/src/orxonox/weaponsystem/WeaponSlot.cc
r9667 r10648 62 62 } 63 63 64 /** 65 @brief 66 Attaches the passed Weapon to this WeaponSlot. If this WeaponSlot is already occupied the old Weapon is removed and replaced by the new one. 67 */ 64 68 void WeaponSlot::attachWeapon(Weapon *weapon) 65 69 { … … 76 80 } 77 81 82 /** 83 @brief 84 Removes the attached weapon if there is any. 85 */ 78 86 void WeaponSlot::removeWeapon() 79 87 { -
code/trunk/src/orxonox/weaponsystem/WeaponSlot.h
r9667 r10648 35 35 namespace orxonox 36 36 { 37 38 39 40 41 37 /** 38 @brief 39 The a WeaponSlot defines where a @ref orxonox::Weapon "Weapon" is placed on a pawn. (A WeaponSlot is a StaticEntity) 40 In a WeaponSlot there can be only one "Weapon", but a Weapon can have several @ref orxonox::WeaponMode "WeaponModes". 41 A WeaponMode is what one intuitively imagines as weapon. (E.g. RocketFire, LightningGun, LaserFire are weaponmodes) 42 42 43 44 45 46 47 48 49 43 A WeaponSlot is created in XML (in a weaponsettings file), which can be done in the following fashion: 44 @code 45 <weaponslots> 46 <WeaponSlot position="-15.0,-1.5,0" /> 47 <WeaponSlot position=" 15.0,-1.5,0" /> 48 <WeaponSlot position=" 0, 0,0" /> 49 </weaponslots> 50 50 51 @author 52 Martin Polak 51 A WeaponSlot can be attached to a @ref orxonox::Pawn because WeaponSlot inherits from @ref orxonox::StaticEntity. 53 52 54 @ingroup Weaponsystem 53 @author 54 Martin Polak 55 56 @ingroup Weaponsystem 55 57 */ 56 58 class _OrxonoxExport WeaponSlot : public StaticEntity … … 67 69 { return this->weapon_; } 68 70 71 /** 72 @brief 73 Checks whether there is a Weapon attached to this WeaponSlot. 74 */ 69 75 inline bool isOccupied() const 70 76 { return (this->weapon_ != 0); } … … 77 83 78 84 private: 79 WeaponSystem * weaponSystem_; 80 Weapon * weapon_; 85 WeaponSystem * weaponSystem_; // Pointer to the WeaponSystem 86 Weapon * weapon_; // If the WeaponSlot is occupied a pointer to the attached Weapon is stored here. 81 87 }; 82 88 }
Note: See TracChangeset
for help on using the changeset viewer.