Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4504 in orxonox.OLD for orxonox/trunk/src/world_entities/test_gun.cc


Ignore:
Timestamp:
Jun 4, 2005, 12:38:30 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the SoundEngine into the Trunk.
merged file by file, but merged all the files in favor of the new trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/test_gun.cc

    r4467 r4504  
    3131#include "list.h"
    3232#include "animation3d.h"
     33#include "sound_engine.h"
    3334
    3435#include "object_manager.h"
     
    8990      this->animation3->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
    9091    }
    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);
    9296  Projectile* p = new TestBullet(this);
    9397  ObjectManager::getInstance()->cache(CL_TEST_BULLET, 100, p);
     
    146150
    147151  Projectile* pj = dynamic_cast<Projectile*>(ObjectManager::getInstance()->getFromDeadList(CL_TEST_BULLET));
     152  weaponSource->play();
     153
    148154  pj->setAbsCoor(this->getAbsCoor() + this->projectileOffset);
    149155  pj->setAbsDir(this->getAbsDir());
Note: See TracChangeset for help on using the changeset viewer.