/*! * @file mover_station.h * A station for a mover. */ #ifndef _MOVER_STATION_H #define _MOVER_STATION_H #include "world_entity.h" #include "sound_buffer.h" #include "sound/resource_sound_buffer.h" class MoverStation : public WorldEntity { friend class MoverStationList; ObjectListDeclaration(MoverStation); public: MoverStation(const TiXmlElement* root = NULL); virtual ~MoverStation(); virtual void loadParams(const TiXmlElement* root); void setRank(int id) { this->rank = id; } void setRelTargetCoor(float x = 0, float y = 0, float z = 0) { this->relTargetCoor = Vector(x, y, z); } void setRelTargetDir(float wx = 0, float wy = 0, float wz = 0) { this->relTargetDir = Vector(wx, wy, wz); } void setDelay(float t) { this->delay = t; } void setMovingTime(float t) { this->movingTime = t; } void setStayOpenTime(float t) { this->stayOpenTime = t; } void setAccelerate() { this->bAccelerate = true; } void setDecelerate() { this->bDecelerate = true; } void setJumpToRank(int rank) { this->jumpToRank = rank; this->bJumpToRank = true; } void setMoveToRank(int rank) { this->moveToRank = rank; this->bMoveToRank = true; } void setOpen() { this->bIsOpen = true; } void setClosed() { this->bIsClosed = true; } void setOpeningSoundFile(const std::string& fileName) { this->soundBuffer_opening = OrxSound::ResourceSoundBuffer(fileName); } void setOpenedSoundFile(const std::string& fileName) { this->soundBuffer_opened = OrxSound::ResourceSoundBuffer(fileName); } void setMovingSoundFile(const std::string& fileName) { this->soundBuffer_moving = OrxSound::ResourceSoundBuffer(fileName); } void setClosingSoundFile(const std::string& fileName) { this->soundBuffer_closing = OrxSound::ResourceSoundBuffer(fileName); } void setClosedSoundFile(const std::string& fileName) { this->soundBuffer_closed = OrxSound::ResourceSoundBuffer(fileName); } private: int rank; Vector relTargetCoor; Vector relTargetDir; float delay; float movingTime; float stayOpenTime; bool bAccelerate; bool bDecelerate; int jumpToRank; bool bJumpToRank; int moveToRank; bool bMoveToRank; bool bIsOpen; bool bIsClosed; OrxSound::SoundBuffer soundBuffer_opening; OrxSound::SoundBuffer soundBuffer_opened; OrxSound::SoundBuffer soundBuffer_moving; OrxSound::SoundBuffer soundBuffer_closing; OrxSound::SoundBuffer soundBuffer_closed; }; #endif