Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9230 in orxonox.OLD


Ignore:
Timestamp:
Jul 5, 2006, 2:06:28 PM (18 years ago)
Author:
amaechler
Message:
 
Location:
branches/presentation/src/world_entities/space_ships
Files:
4 edited

Legend:

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

    r8783 r9230  
    4343                            ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY))
    4444                            ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))
    45                            
     45
    4646                       );
    4747
     
    124124void Helicopter::init()
    125125{
     126  this->chopperBuffer = NULL;
     127
    126128  this->setClassID(CL_HELICOPTER, "Helicopter");
    127 
    128129  PRINTF(4)("HELICOPTER INIT\n");
    129130
  • branches/presentation/src/world_entities/space_ships/helicopter.h

    r8783 r9230  
    3939
    4040    virtual void process(const Event &event);
    41    
     41
    4242    virtual void moveUp(bool move){bAscend = move;};
    4343    virtual void moveDown(bool move){bDescend = move;};
     
    7878    float                 airViscosity;
    7979
    80     OrxSound::SoundSource soundSource;
    81     OrxSound::SoundBuffer*chopperBuffer;
     80    OrxSound::SoundSource  soundSource;
     81    OrxSound::SoundBuffer* chopperBuffer;
    8282
    8383};
  • 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
  • branches/presentation/src/world_entities/space_ships/hover.h

    r7346 r9230  
    77#ifndef _HOVER_H
    88#define _HOVER_H
     9
     10#include "sound_buffer.h"
     11#include "sound_source.h"
    912
    1013#include "playable.h"
     
    6871    float                 airViscosity;
    6972
    70     WorldEntity* hitEntity;
     73    WorldEntity*          hitEntity;
     74
     75    OrxSound::SoundSource  soundSource;
     76    OrxSound::SoundBuffer* hoverBuffer;
    7177};
    7278
Note: See TracChangeset for help on using the changeset viewer.