Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 19, 2005, 8:31:01 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/sound_engine: sound works sloppy, test it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/sound_engine/src/world_entities/test_gun.cc

    r3881 r3898  
    3232#include "animation3d.h"
    3333
     34#include "resource_manager.h"
     35#include "sound_engine.h"
     36
    3437using namespace std;
    3538
     
    7275      this->animation->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
    7376    }
     77
     78  this->shootSound = (Sound*)ResourceManager::getInstance()->load("sound/explo.wav", RESOURCE_SOUND_EFFECT, RP_LEVEL);
    7479  /*
    7580  if( this->leftRight == 0)
     
    127132void TestGun::fire()
    128133{
     134  if (likely(this->shootSound != NULL))
     135    this->shootSound->play();
     136
    129137  if( !this->hasWeaponIdleTimeElapsed())
    130138    {
     
    144152 
    145153  this->animation->replay();
     154
    146155}
    147156
Note: See TracChangeset for help on using the changeset viewer.