Changeset 4504 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Jun 4, 2005, 12:38:30 AM (20 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/test_gun.cc
r4467 r4504 31 31 #include "list.h" 32 32 #include "animation3d.h" 33 #include "sound_engine.h" 33 34 34 35 #include "object_manager.h" … … 89 90 this->animation3->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 90 91 } 91 92 93 this->fireSound = (SoundBuffer*)ResourceManager::getInstance()->load("sound/shot1.wav", WAV); 94 this->weaponSource = new SoundSource(this->fireSound, this); 95 this->weaponSource->setRolloffFactor(.1); 92 96 Projectile* p = new TestBullet(this); 93 97 ObjectManager::getInstance()->cache(CL_TEST_BULLET, 100, p); … … 146 150 147 151 Projectile* pj = dynamic_cast<Projectile*>(ObjectManager::getInstance()->getFromDeadList(CL_TEST_BULLET)); 152 weaponSource->play(); 153 148 154 pj->setAbsCoor(this->getAbsCoor() + this->projectileOffset); 149 155 pj->setAbsDir(this->getAbsDir()); -
orxonox/trunk/src/world_entities/weapon.h
r3888 r4504 175 175 int leftRight; // this will become an enum 176 176 177 SoundBuffer* fireSound; 178 SoundSource* weaponSource; 179 180 177 181 private: 178 182 bool enabled; //<! states if the weapon is enabled or not -
orxonox/trunk/src/world_entities/world_entity.h
r4261 r4504 13 13 #include "load_param.h" 14 14 15 16 15 //class CollisionCluster; 17 16 class CharacterAttributes; 18 17 class Model; 18 class SoundEngine; 19 class SoundBuffer; 20 class SoundSource; 21 19 22 //! Basic class from which all interactive stuff in the world is derived from 20 23 class WorldEntity : public PNode
Note: See TracChangeset
for help on using the changeset viewer.