Changeset 7460 in orxonox.OLD for trunk/src/world_entities/weapons
- Timestamp:
- May 1, 2006, 12:30:34 AM (19 years ago)
- Location:
- trunk/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/weapon.cc
r7350 r7460 107 107 this->soundBuffers[i] = NULL; //< No Sounds 108 108 109 this->soundSource = new SoundSource(this); //< Every Weapon has exacty one SoundSource.109 this->soundSource = new OrxSound::SoundSource(this); //< Every Weapon has exacty one SoundSource. 110 110 this->emissionPoint.setParent(this); //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles 111 111 this->emissionPoint.setName("EmissionPoint"); … … 263 263 else if (!soundFile.empty()) 264 264 { 265 this->soundBuffers[action] = ( SoundBuffer*)ResourceManager::getInstance()->load(soundFile, WAV);265 this->soundBuffers[action] = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(soundFile, WAV); 266 266 if (this->soundBuffers[action] != NULL) 267 267 { -
trunk/src/world_entities/weapons/weapon.h
r7350 r7460 218 218 // PHASES // 219 219 //////////// 220 SoundSource*soundSource; //!< A SoundSource to play sound from (this is connected to the PNode of the Weapon)221 222 WeaponState currentState; //!< The State the weapon is in.223 WeaponAction requestedAction; //!< An action to try to Engage after the currentState ends.224 float stateDuration; //!< how long the state has taken until now.225 float times[WS_STATE_COUNT]; //!< Times to stay in the different States @see WeaponState.226 Animation3D* animation[WS_STATE_COUNT]; //!< Animations for all the States (you can say yourself on what part of the gun this animation acts).227 SoundBuffer*soundBuffers[WA_ACTION_COUNT]; //!< SoundBuffers for all actions @see WeaponAction.228 229 PNode emissionPoint; //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)230 231 bool hideInactive; //!< Hides the Weapon if it is inactive232 bool chargeable; //!< if the Weapon is charcheable (if true, the weapon will charge before it fires.)233 234 ClassID projectile; //!< the projectile used for this weapon (since they should be generated via macro and the FastFactory, only the ClassID must be known.)235 FastFactory* projectileFactory; //!< A factory, that produces and handles the projectiles.220 OrxSound::SoundSource* soundSource; //!< A SoundSource to play sound from (this is connected to the PNode of the Weapon) 221 222 WeaponState currentState; //!< The State the weapon is in. 223 WeaponAction requestedAction; //!< An action to try to Engage after the currentState ends. 224 float stateDuration; //!< how long the state has taken until now. 225 float times[WS_STATE_COUNT]; //!< Times to stay in the different States @see WeaponState. 226 Animation3D* animation[WS_STATE_COUNT]; //!< Animations for all the States (you can say yourself on what part of the gun this animation acts). 227 OrxSound::SoundBuffer* soundBuffers[WA_ACTION_COUNT]; //!< SoundBuffers for all actions @see WeaponAction. 228 229 PNode emissionPoint; //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default) 230 231 bool hideInactive; //!< Hides the Weapon if it is inactive 232 bool chargeable; //!< if the Weapon is charcheable (if true, the weapon will charge before it fires.) 233 234 ClassID projectile; //!< the projectile used for this weapon (since they should be generated via macro and the FastFactory, only the ClassID must be known.) 235 FastFactory* projectileFactory; //!< A factory, that produces and handles the projectiles. 236 236 }; 237 237
Note: See TracChangeset
for help on using the changeset viewer.