Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 5, 2006, 2:06:28 PM (19 years ago)
Author:
amaechler
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/space_ships/hover.cc

    r9129 r9230  
    2525
    2626#include "util/loading/factory.h"
     27#include "util/loading/resource_manager.h"
     28
    2729#include "key_mapper.h"
    2830#include "state.h"
     
    4345                        ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))
    4446                       );
    45                        
     47
    4648/**
    4749 *  destructs the hover, deletes alocated memory
     
    6870
    6971  this->loadParams(doc.RootElement());
     72
     73 //load sound
     74  if (this->hoverBuffer != NULL)
     75    ResourceManager::getInstance()->unload(this->hoverBuffer);
     76  this->hoverBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/engine/hover.wav", WAV);
     77
    7078}
    7179
     
    107115void Hover::init()
    108116{
     117
     118  this->hitEntity = NULL;
     119  this->hoverBuffer = NULL;
     120
    109121  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
    110122  this->setClassID(CL_HOVER, "Hover");
     
    216228  State::getCameraNode()->setRelCoorSoft(-10, 0,0);
    217229  State::getCameraTargetNode()->setParentSoft(&this->cameraNode);
     230
     231  this->soundSource.play(this->hoverBuffer, 0.3f, true);
     232
    218233}
    219234
Note: See TracChangeset for help on using the changeset viewer.