Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10487 in orxonox.OLD for trunk/src/world_entities/npcs/mover.h


Ignore:
Timestamp:
Jan 29, 2007, 11:51:25 PM (17 years ago)
Author:
patrick
Message:

patches from x3n

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/mover.h

    r10423 r10487  
    1111#include "world_entity.h"
    1212
     13#include "sound_buffer.h"
     14#include "sound_source.h"
     15
    1316//! A Class to handle a Mover
    1417class Mover : public WorldEntity
    1518{
    16   ObjectListDeclaration(Mover);
    17   public:
    18     typedef enum MoverState {
    19       Closed        = 0,
    20       Opening       = 1,
    21       Open          = 2,
    22       Closing       = 3,
    23       Locked        = 4
    24     };
     19    ObjectListDeclaration(Mover);
     20    public:
     21        typedef enum MoverState {
     22            Closed        = 0,
     23            Opening       = 1,
     24            Open          = 2,
     25            Closing       = 3,
     26            Locked        = 4
     27        };
    2528
    26     Mover(const TiXmlElement* root = NULL);
    27     virtual ~Mover();
     29        Mover(const TiXmlElement* root = NULL);
     30        virtual ~Mover();
    2831
    29     virtual void loadParams(const TiXmlElement* root);
     32        virtual void loadParams(const TiXmlElement* root);
    3033
    31     void setTargetCoordinates(float x, float y, float z) { this->targetCoordinates = Vector(x,y,z); }
    32     void setActionRadius(float radius) { this->actionRadius = radius; }
    33     void setActionTime(float time) { this->actionTime = time; }
     34        void setTargetCoordinates(float x, float y, float z) { this->targetCoordinates = Vector(x,y,z); }
     35        void setActionRadius(float radius) { this->actionRadius = radius; }
     36        void setActionTime(float time) { this->actionTime = time; }
     37        void setOpeningSoundFile(const std::string& fileName);
     38        void setOpenedSoundFile(const std::string& fileName);
     39        void setMovingSoundFile(const std::string& fileName);
     40        void setClosingSoundFile(const std::string& fileName);
     41        void setClosedSoundFile(const std::string& fileName);
    3442
    35     virtual void tick(float dt);
     43        virtual void tick(float dt);
    3644
    37   private:
    38     bool checkOpen(float dt);
    39     bool checkClosed(float dt);
    40     bool checkPlayerInActionRadius();
     45    private:
     46        bool checkOpen(float dt);
     47        bool checkClosed(float dt);
     48        bool checkPlayerInActionRadius();
     49   
     50        OrxSound::SoundSource       soundSource_starting;
     51        OrxSound::SoundSource       soundSource_moving;
     52        OrxSound::SoundSource       soundSource_ending;
     53        OrxSound::SoundBuffer       soundBuffer_opening;
     54        OrxSound::SoundBuffer       soundBuffer_opened;
     55        OrxSound::SoundBuffer       soundBuffer_moving;
     56        OrxSound::SoundBuffer       soundBuffer_closing;
     57        OrxSound::SoundBuffer       soundBuffer_closed;
    4158
    42   private:
    43     Vector              targetCoordinates;          //!< the target coordinates
    44     Vector              originCoordinates;          //!< the origin coordinates
    45     float               actionRadius;               //!< the action-radius
    46     float               actionTime;                 //!< the action-time
    47     int                 state;                      //!< the state of the mover
     59        Vector                      targetCoordinates;          //!< the target coordinates
     60        Vector                      originCoordinates;          //!< the origin coordinates
     61        float                       actionRadius;               //!< the action-radius
     62        float                       actionTime;                 //!< the action-time
     63        int                         state;                      //!< the state of the mover
    4864};
    4965
Note: See TracChangeset for help on using the changeset viewer.