Changeset 7460 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- May 1, 2006, 12:30:34 AM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/effects/lightning_bolt.cc
r7193 r7460 61 61 if (this->thunderBuffer != NULL) 62 62 ResourceManager::getInstance()->unload(this->thunderBuffer); 63 this->thunderBuffer = ( SoundBuffer*)ResourceManager::getInstance()->load("sound/thunder.wav", WAV);63 this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/thunder.wav", WAV); 64 64 } 65 65 -
trunk/src/world_entities/effects/lightning_bolt.h
r7113 r7460 50 50 float seedTime; 51 51 52 SoundSource soundSource;53 SoundBuffer* thunderBuffer;52 OrxSound::SoundSource soundSource; 53 OrxSound::SoundBuffer* thunderBuffer; 54 54 }; 55 55 -
trunk/src/world_entities/power_ups/power_up.cc
r7221 r7460 82 82 else if (!pickupSound.empty()) 83 83 { 84 this->pickupBuffer = ( SoundBuffer*)ResourceManager::getInstance()->load(pickupSound, WAV);84 this->pickupBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(pickupSound, WAV); 85 85 if (this->pickupBuffer != NULL) 86 86 { … … 103 103 else if (!respawnSound.empty()) 104 104 { 105 this->respawnBuffer = ( SoundBuffer*)ResourceManager::getInstance()->load(respawnSound, WAV);105 this->respawnBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(respawnSound, WAV); 106 106 if (this->respawnBuffer != NULL) 107 107 { -
trunk/src/world_entities/power_ups/power_up.h
r7221 r7460 45 45 46 46 private: 47 SoundSourcesoundSource;48 SoundBuffer*pickupBuffer;49 SoundBuffer*respawnBuffer;50 Material* sphereMaterial;51 PowerUpRespawn respawnType;52 float respawnTime;53 float respawnStart;54 static const char* respawnTypes[];47 OrxSound::SoundSource soundSource; 48 OrxSound::SoundBuffer* pickupBuffer; 49 OrxSound::SoundBuffer* respawnBuffer; 50 Material* sphereMaterial; 51 PowerUpRespawn respawnType; 52 float respawnTime; 53 float respawnStart; 54 static const char* respawnTypes[]; 55 55 56 WorldEntity* collider;56 WorldEntity* collider; 57 57 }; 58 58 -
trunk/src/world_entities/projectiles/projectile.cc
r7221 r7460 68 68 else if (!explosionSound.empty()) 69 69 { 70 this->explosionBuffer = ( SoundBuffer*)ResourceManager::getInstance()->load(explosionSound, WAV);70 this->explosionBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(explosionSound, WAV); 71 71 if (this->explosionBuffer != NULL) 72 72 { … … 90 90 else if (!engineSound.empty()) 91 91 { 92 this->engineBuffer = ( SoundBuffer*)ResourceManager::getInstance()->load(engineSound, WAV);92 this->engineBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(engineSound, WAV); 93 93 if (this->engineBuffer != NULL) 94 94 { -
trunk/src/world_entities/projectiles/projectile.h
r7221 r7460 52 52 protected: 53 53 // energy 54 float energyMin; //!< The minimal Energy a Projectile needs to be emitted.55 bool bChargeable; //!< if the Projectile is Charegeable54 float energyMin; //!< The minimal Energy a Projectile needs to be emitted. 55 bool bChargeable; //!< if the Projectile is Charegeable 56 56 57 float lifeCycle; //!< The percentage of the Lifetime done [0-1]58 float lifeSpan; //!< The entire lifespan of the Shoot. in seconds57 float lifeCycle; //!< The percentage of the Lifetime done [0-1] 58 float lifeSpan; //!< The entire lifespan of the Shoot. in seconds 59 59 60 Vector flightDirection; //!< DOF direction in which the shoot flighs60 Vector flightDirection; //!< DOF direction in which the shoot flighs 61 61 62 Vector velocity; //!< velocity of the projectile.62 Vector velocity; //!< velocity of the projectile. 63 63 64 PNode* target; //!< A target for guided Weapons.64 PNode* target; //!< A target for guided Weapons. 65 65 66 SoundSourcesoundSource;66 OrxSound::SoundSource soundSource; 67 67 private: 68 SoundBuffer*explosionBuffer;69 SoundBuffer*engineBuffer;68 OrxSound::SoundBuffer* explosionBuffer; 69 OrxSound::SoundBuffer* engineBuffer; 70 70 }; 71 71 -
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 -
trunk/src/world_entities/world_entity.h
r7370 r7460 16 16 17 17 // FORWARD DECLARATION 18 class SoundBuffer; 19 class SoundSource; 18 namespace OrxSound { class SoundBuffer; class SoundSource; } 20 19 class BVTree; 21 20 class Model;
Note: See TracChangeset
for help on using the changeset viewer.