Changeset 6153 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Dec 17, 2005, 7:05:52 PM (19 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/campaign.cc
r6152 r6153 121 121 se->postLoad(); 122 122 123 se->init(); 123 124 se->preStart(); 124 125 se->start(); -
trunk/src/story_entities/story_entity.cc
r6152 r6153 27 27 { 28 28 this->setClassID(CL_STORY_ENTITY, "StoryEntity"); 29 this->isInit = false; 30 this->readyToRun = false; 31 this->isPaused = false; 32 this->isSuspended = false; 29 33 } 34 30 35 StoryEntity::~StoryEntity () {} 31 36 -
trunk/src/story_entities/story_entity.h
r6152 r6153 19 19 virtual ~StoryEntity (); 20 20 21 22 21 // INIT AND LOAD // 22 /** @brief initializes a Story Entity to default Values */ 23 virtual ErrorMessage init() {}; 24 /** @brief called before loading */ 23 25 virtual ErrorMessage preLoad() {}; 26 /** @brief called to load. */ 24 27 virtual ErrorMessage load() {}; 28 /** @brief called right after loading */ 25 29 virtual ErrorMessage postLoad() {}; 30 /** @brief called after postload to check for integrity. (optional) */ 26 31 virtual ErrorMessage check() {}; 27 32 28 33 // RUNNING // 34 /** @brief called shortly before starting the Entity */ 29 35 virtual ErrorMessage preStart() {}; 36 /** @brief starts the Entity. Starts the main cycle */ 30 37 virtual ErrorMessage start() = 0; 38 /** @brief pauses the Entity. call to resume required to get it running again */ 31 39 virtual ErrorMessage pause() = 0; 40 /** @brief resumes the Entity after a stop/pause or suspend. */ 41 virtual ErrorMessage resume() = 0; 42 /** @brief suspends the Entity detaches all mayor functions (optional) */ 43 virtual ErrorMessage suspend() {}; 44 /** @brief rewinds to the beginning/last checkpoint */ 32 45 virtual ErrorMessage rewind() {}; 33 virtual ErrorMessage suspend() {}; 34 virtual ErrorMessage resume() = 0; 46 /** @brief leaves the Entity. Ends it */ 47 virtual ErrorMessage preStop() {}; 48 /** @brief Stops the entity. */ 35 49 virtual ErrorMessage stop() = 0; 50 51 // KILLING 52 /** @brief kills the Entity. should also calls prestop stop */ 36 53 virtual ErrorMessage destroy() {}; 37 54 … … 49 66 50 67 private: 51 int storyID; //!< this is the number of this entity, identifying it in a list/tree...52 int nextStoryID; //!< if this entity has finished, this entity shall be called68 int storyID; //!< this is the number of this entity, identifying it in a list/tree... 69 int nextStoryID; //!< if this entity has finished, this entity shall be called 53 70 }; 54 71
Note: See TracChangeset
for help on using the changeset viewer.