Changeset 4890 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons/weapon.h
- Timestamp:
- Jul 19, 2005, 12:20:58 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/weapon.h
r4885 r4890 28 28 class TiXmlElement; 29 29 30 //! An enumerator defining actions a Weapon can take30 //! An enumerator defining Actions a Weapon can take 31 31 typedef enum { 32 32 WA_NONE = 0, //!< No Action taken … … 80 80 81 81 void requestAction(WeaponAction action); 82 float increaseEnergy(float energyToAdd); 82 83 83 84 /** @returns true if the Weapon is Active */ … … 117 118 118 119 protected: 119 // utility:120 static WeaponAction charToAction(const char* action);121 static const char* actionToChar(WeaponAction action);122 static WeaponState charToState(const char* state);123 static const char* stateToChar(WeaponState state);124 125 120 //! ACTION: these functions are handled by the Weapon itself, and must be called by requestAction(WeaponAction); 126 121 bool execute(); … … 131 126 virtual void charge(); 132 127 128 129 // utility: 130 static WeaponAction charToAction(const char* action); 131 static const char* actionToChar(WeaponAction action); 132 static WeaponState charToState(const char* state); 133 static const char* stateToChar(WeaponState state); 133 134 private: 134 135 bool nextActionValid() const; 135 136 137 138 136 139 protected: 137 SoundSource* soundSource; 140 SoundSource* soundSource; //!< A SoundSource to play sound from (this is connected to the PNode of the Weapon) 138 141 // it is all about energy 139 float energy; 140 float energyLoaded; 141 float energyMax; 142 float energyLoadedMax; 143 float minCharge; 144 float maxCharge; 142 float energy; //!< The energy stored in the weapons secondary buffers (reserve) 143 float energyLoaded; //!< The energy stored in the weapons primary buffers (firewithout reload) 144 float energyMax; //!< The maximal energy that can be stored in the secondary buffers (reserveMax) 145 float energyLoadedMax; //!< The maximal energy that can be stored in the primary buffers 146 float minCharge; //!< The minimal energy to be loaded onto one projectile if chargeable otherwise the power consumed by one projectile 147 float maxCharge; //!< The maximal energy to be loaded onto one projectile (this is only availible if chargeable is enabled) 145 148 146 149 //////////// … … 156 159 157 160 161 bool active; //!< states wheter the weapon is enabled or not 158 162 bool hideInactive; //!< Hides the Weapon if it is inactive 163 bool chargeable; //!< if the Weapon is charcheable 159 164 160 bool active; //!< states wheter the weapon is enabled or not161 165 Projectile* projectile; //!< the projectile used for this weapon 162 166 };
Note: See TracChangeset
for help on using the changeset viewer.