Changeset 4875 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons
- Timestamp:
- Jul 16, 2005, 10:02:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/weapon.h
r4836 r4875 51 51 WS_IDLE = 7, //!< The State where the weapon is idle 52 52 53 WS_STATE_COUNT = 8 //!< This must match the count of theenumerations-members.53 WS_STATE_COUNT = 8 //!< This must match the count of enumerations-members. 54 54 } WeaponState; 55 55 … … 95 95 inline float getWeaponIdleTime() const { return this->idleTime; }; 96 96 /** @return true if idletime is elapsed else otherwise */ 97 inline bool hasWeaponIdleTimeElapsed() const { return (this->localTime >this->idleTime)?true:false; };97 inline bool hasWeaponIdleTimeElapsed() const { return (this->localTime > this->idleTime)?true:false; }; 98 98 99 99 /** fires the weapon */ … … 107 107 108 108 protected: 109 110 109 float localTime; //<! this is the local time. important for shooting attributes like frequency 111 110 float idleTime; //<! the time a weapon needs before it can shoot again. eg. shooting frequency or actication/deactivateion delay … … 115 114 // PHASES // 116 115 //////////// 117 float times[WS_STATE_COUNT]; //!< Times to stay in the different States @see WeaponState 118 SoundBuffer* soundBuffers[WA_ACTION_COUNT]; //!< SoundBuffers for all actions @see WeaponAction 116 WeaponState currentState; //!< The State the weapon is in. 117 float stateTime; //!< how long the state has teken until now. 118 float times[WS_STATE_COUNT]; //!< Times to stay in the different States @see WeaponState. 119 SoundBuffer* soundBuffers[WA_ACTION_COUNT]; //!< SoundBuffers for all actions @see WeaponAction. 119 120 Animation3D* animation[WS_STATE_COUNT]; //!< Animations for all the States (you can say yourself on what part of the gun this animation acts). 120 121 121 122 122 SoundBuffer* fireSound; 123 123 SoundSource* weaponSource; 124 124 125 float minCharge; 126 float maxCharge; 125 127 126 128 private: 127 WeaponState state; //!< The state this weapon is in.128 129 bool enabled; //<! states if the weapon is enabled or not 129 130 Projectile* projectile; //<! the projectile used for this weapon
Note: See TracChangeset
for help on using the changeset viewer.