Changeset 4883 in orxonox.OLD for orxonox/branches/weaponSystem/src/world_entities/weapons/weapon.h
- Timestamp:
- Jul 17, 2005, 4:02:36 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/weaponSystem/src/world_entities/weapons/weapon.h
r4882 r4883 85 85 86 86 // FUNCTIONS TO SET THE WEAPONS PROPERTIES. 87 void setProjectile(Projectile* projectile); 88 Projectile* getProjectile(); 87 /** @param projectile a projectile for this weapon */ 88 void setProjectile(Projectile* projectile) { this->projectile = projectile; }; 89 /** @returns The projectile if availiable */ 90 Projectile* getProjectile() { return this->projectile; }; 89 91 90 92 /** @param state the State to time @param duration the duration of the State */ … … 98 100 /** @returns the current State of the Weapon */ 99 101 inline WeaponState getCurrentState() const { return this->currentState; }; 102 /** @param energyMax the maximum energy the Weapon can have @param energyLoadedMax the maximum energy in the weapon buffers */ 103 inline void setMaximumEnergy(float energyMax, float energyLoadedMax = 0.0) { this->energyMax = energyMax; this->energyLoadedMax = energyLoadedMax; }; 100 104 101 inline void setMaximumEnergy(float energyMax, float energyLoadedMax = 0.0) { this->energyMax = energyMax; this->energyLoadedMax = energyLoadedMax; }; 105 void setActionSound(WeaponAction action, const char* soundFile); 106 /** @see void setActionSound(WeaponAction action, const char* soundFile); */ 107 void setActionSound(const char* action, const char* soundFile) { this->setActionSound(charToAction(action), soundFile); }; 102 108 103 109 virtual void destroy(); … … 129 135 130 136 protected: 131 SoundSource* weaponSource;137 SoundSource* soundSource; 132 138 // it is all about energy 133 139 float energy; … … 145 151 float stateDuration; //!< how long the state has taken until now. 146 152 float times[WS_STATE_COUNT]; //!< Times to stay in the different States @see WeaponState. 153 Animation3D* animation[WS_STATE_COUNT]; //!< Animations for all the States (you can say yourself on what part of the gun this animation acts). 147 154 SoundBuffer* soundBuffers[WA_ACTION_COUNT]; //!< SoundBuffers for all actions @see WeaponAction. 148 Animation3D* animation[WS_STATE_COUNT]; //!< Animations for all the States (you can say yourself on what part of the gun this animation acts).149 155 150 156
Note: See TracChangeset
for help on using the changeset viewer.