Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 17, 2006, 1:40:05 PM (18 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine: loop updates and chopper sound

Location:
branches/atmospheric_engine/src/world_entities/space_ships
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/world_entities/space_ships/helicopter.cc

    r7337 r7647  
    2525
    2626#include "util/loading/factory.h"
     27#include "util/loading/resource_manager.h"
     28
    2729#include "key_mapper.h"
    2830#include "event_handler.h"
     
    9698  this->getWeaponManager().changeWeaponConfig(1);
    9799  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
     100
     101  //load sound
     102  if (this->chopperBuffer != NULL)
     103    ResourceManager::getInstance()->unload(this->chopperBuffer);
     104  this->chopperBuffer = (SoundBuffer*)ResourceManager::getInstance()->load("sound/chopper.wav", WAV);
     105
    98106}
    99107
     
    205213  State::getCameraNode()->setParentSoft(this->getWeaponManager().getFixedTarget());
    206214  State::getCameraTargetNode()->setParentSoft(this->getWeaponManager().getFixedTarget());
     215
     216  this->soundSource.loop(this->chopperBuffer);
     217  PRINTF(0)( "Playing ChopperSound\n" );
    207218}
    208219
  • branches/atmospheric_engine/src/world_entities/space_ships/helicopter.h

    r7346 r7647  
    1010#include "playable.h"
    1111
     12#include "sound_buffer.h"
     13#include "sound_source.h"
    1214
    1315class Helicopter : public Playable
     
    7173    float                 airViscosity;
    7274
     75    SoundSource           soundSource;
     76    SoundBuffer*          chopperBuffer;
     77
    7378};
    7479
Note: See TracChangeset for help on using the changeset viewer.