Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 9, 2009, 3:18:11 AM (15 years ago)
Author:
landauf
Message:

Several small adjustments in the weaponsystem (like additional const keyword, includes moved from .h to .cc where possible, …)

Firemode is now an unsigned int instead of an Enum. Instead of "fire" and "altFire" use "fire 0" and "fire 1"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapons/src/orxonox/objects/weaponSystem/WeaponSet.h

    r2662 r2912  
    3333#include "OrxonoxPrereqs.h"
    3434
     35#include <vector>
     36
    3537#include "core/BaseObject.h"
    36 
    37 #include "WeaponSlot.h"
    38 
    3938
    4039namespace orxonox
     
    5150            void fire();
    5251
    53             void setFireMode(const unsigned int firemode);
    54             const unsigned int getFireMode() const;
     52            inline void setFireMode(const unsigned int firemode)
     53                { this->firemode_ = firemode; }
     54            inline unsigned int getFireMode() const
     55                { return this->firemode_; }
    5556
    56             inline void setParentWeaponSystem(WeaponSystem *parentWeaponSystem)
    57                 { parentWeaponSystem_=parentWeaponSystem; }
    58             inline WeaponSystem * getParentWeaponSystem()
    59                 { return parentWeaponSystem_; }
     57            inline void setWeaponSystem(WeaponSystem *weaponSystem)
     58                { this->weaponSystem_ = weaponSystem; }
     59            inline WeaponSystem * getWeaponSystem() const
     60                { return this->weaponSystem_; }
    6061
    6162        private:
    62             WeaponSystem *parentWeaponSystem_;
     63            WeaponSystem *weaponSystem_;
    6364            std::vector<WeaponSlot *> setWeaponSlots_;
    6465            unsigned int firemode_;
Note: See TracChangeset for help on using the changeset viewer.