Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 5, 2006, 4:39:02 PM (19 years ago)
Author:
bensch
Message:

merged the presentation back

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/space_ships/hover.cc

    r8719 r9235  
    2525
    2626#include "util/loading/factory.h"
     27//#include "util/loading/resource_manager.h"
     28
    2729#include "key_mapper.h"
    2830#include "state.h"
     
    3436CREATE_FACTORY(Hover, CL_HOVER);
    3537
     38#include "script_class.h"
     39CREATE_SCRIPTABLE_CLASS(Hover, CL_HOVER,
     40                        addMethod("hasPlayer", ExecutorLua0ret<Playable,bool>(&Playable::hasPlayer))
     41                        //Coordinates
     42                        ->addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
     43                        ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
     44                        ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY))
     45                        ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))
     46                       );
     47
    3648/**
    3749 *  destructs the hover, deletes alocated memory
     
    4052{
    4153  this->setPlayer(NULL);
     54
     55  //if (this->hoverBuffer != NULL)
     56  //  ResourceManager::getInstance()->unload(this->hoverBuffer);
    4257}
    4358
     
    5873
    5974  this->loadParams(doc.RootElement());
     75
     76  //load sound
     77  //if (this->hoverBuffer != NULL)
     78  //  ResourceManager::getInstance()->unload(this->hoverBuffer);
     79  //this->hoverBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/engine/hover.wav", WAV);
     80
    6081}
    6182
     
    97118void Hover::init()
    98119{
     120
     121  //this->hitEntity = NULL;
     122  //this->hoverBuffer = NULL;
     123
    99124  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
    100125  this->setClassID(CL_HOVER, "Hover");
     
    112137  this->cameraLook = 0.0f;
    113138  this->rotation = 0.0f;
    114   this->acceleration = 25.0f;
     139  this->acceleration = 15.0f;
    115140  this->airFriction = 3.0f;
    116141
     
    206231  State::getCameraNode()->setRelCoorSoft(-10, 0,0);
    207232  State::getCameraTargetNode()->setParentSoft(&this->cameraNode);
     233
     234  //this->soundSource.play(this->hoverBuffer, 0.3f, true);
     235
    208236}
    209237
Note: See TracChangeset for help on using the changeset viewer.