- 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/Weapon.h
r2893 r2912 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include "objects/worldentities/StaticEntity.h" 33 34 34 #include "core/BaseObject.h"35 #include "tools/BillboardSet.h"36 35 #include "tools/Timer.h" 37 36 #include "core/Identifier.h" 38 39 #include "WeaponSystem.h"40 #include "Munition.h"41 42 #include "objects/worldentities/StaticEntity.h"43 37 44 38 namespace orxonox … … 53 47 54 48 virtual void fire(); 55 void attachNeededMunition( std::stringmunitionType);56 Munition * getAttachedMunition( std::stringmunitiontype);49 void attachNeededMunition(const std::string& munitionType); 50 Munition * getAttachedMunition(const std::string& munitiontype); 57 51 58 52 //reloading … … 63 57 64 58 //XMLPort functions 65 virtual void setMunitionType( std::stringmunitionType);66 virtual const std::string getMunitionType();59 virtual void setMunitionType(const std::string& munitionType); 60 virtual const std::string& getMunitionType() const; 67 61 virtual void setBulletLoadingTime(float loadingTime); 68 virtual const float getBulletLoadingTime() ;62 virtual const float getBulletLoadingTime() const; 69 63 virtual void setMagazineLoadingTime(float loadingTime); 70 virtual const float getMagazineLoadingTime() ;64 virtual const float getMagazineLoadingTime() const; 71 65 virtual void setBulletAmount(unsigned int amount); 72 virtual const unsigned int getBulletAmount() ;66 virtual const unsigned int getBulletAmount() const; 73 67 virtual void setMagazineAmount(unsigned int amount); 74 virtual const unsigned int getMagazineAmount() ;68 virtual const unsigned int getMagazineAmount() const; 75 69 virtual void setUnlimitedMunition(bool unlimitedMunition); 76 virtual const bool getUnlimitedMunition() ;70 virtual const bool getUnlimitedMunition() const; 77 71 78 72 //weapon actions … … 86 80 virtual void setWeapon(); 87 81 virtual void setMunition(); 88 89 inline void set ParentWeaponSystem(WeaponSystem *parentWeaponSystem)90 { this-> parentWeaponSystem_=parentWeaponSystem; };91 inline WeaponSystem * get ParentWeaponSystem()92 { return this-> parentWeaponSystem_; };82 83 inline void setWeaponSystem(WeaponSystem *weaponSystem) 84 { this->weaponSystem_ = weaponSystem; }; 85 inline WeaponSystem * getWeaponSystem() const 86 { return this->weaponSystem_; }; 93 87 94 88 inline void setAttachedToWeaponSlot(WeaponSlot * wSlot) 95 89 { this->attachedToWeaponSlot_ = wSlot; } 96 inline WeaponSlot * getAttachedToWeaponSlot() 90 inline WeaponSlot * getAttachedToWeaponSlot() const 97 91 { return this->attachedToWeaponSlot_; } 98 99 100 private:101 92 102 93 protected: … … 113 104 WeaponSlot * attachedToWeaponSlot_; 114 105 Munition * munition_; 115 WeaponSystem * parentWeaponSystem_;106 WeaponSystem * weaponSystem_; 116 107 117 108 SubclassIdentifier<Munition> munitionIdentifier_;
Note: See TracChangeset
for help on using the changeset viewer.