Changeset 6371 in orxonox.OLD for branches/network/src/story_entities/story_entity.h
- Timestamp:
- Dec 31, 2005, 2:32:08 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/story_entities/story_entity.h
r6153 r6371 20 20 21 21 // INIT AND LOAD // 22 /** @briefinitializes a Story Entity to default Values */22 /** initializes a Story Entity to default Values */ 23 23 virtual ErrorMessage init() {}; 24 /** @briefcalled before loading */24 /** called before loading */ 25 25 virtual ErrorMessage preLoad() {}; 26 /** @briefcalled to load. */26 /** called to load. */ 27 27 virtual ErrorMessage load() {}; 28 /** @briefcalled right after loading */28 /** called right after loading */ 29 29 virtual ErrorMessage postLoad() {}; 30 /** @briefcalled after postload to check for integrity. (optional) */30 /** called after postload to check for integrity. (optional) */ 31 31 virtual ErrorMessage check() {}; 32 32 33 33 // RUNNING // 34 /** @briefcalled shortly before starting the Entity */34 /** called shortly before starting the Entity */ 35 35 virtual ErrorMessage preStart() {}; 36 /** @briefstarts the Entity. Starts the main cycle */36 /** starts the Entity. Starts the main cycle */ 37 37 virtual ErrorMessage start() = 0; 38 /** @briefpauses the Entity. call to resume required to get it running again */38 /** pauses the Entity. call to resume required to get it running again */ 39 39 virtual ErrorMessage pause() = 0; 40 /** @briefresumes the Entity after a stop/pause or suspend. */40 /** resumes the Entity after a stop/pause or suspend. */ 41 41 virtual ErrorMessage resume() = 0; 42 /** @briefsuspends the Entity detaches all mayor functions (optional) */42 /** suspends the Entity detaches all mayor functions (optional) */ 43 43 virtual ErrorMessage suspend() {}; 44 /** @briefrewinds to the beginning/last checkpoint */44 /** rewinds to the beginning/last checkpoint */ 45 45 virtual ErrorMessage rewind() {}; 46 /** @briefleaves the Entity. Ends it */46 /** leaves the Entity. Ends it */ 47 47 virtual ErrorMessage preStop() {}; 48 /** @briefStops the entity. */48 /** Stops the entity. */ 49 49 virtual ErrorMessage stop() = 0; 50 50 51 // KILLING52 /** @brief kills the Entity. should also calls prestop stop */53 virtual ErrorMessage destroy() {};54 51 55 void setStoryID(int storyID); 56 int getStoryID(); 52 /** sets the story id of the current entity, this enables it to be identified in a global context. @param storyID the story id */ 53 inline void setStoryID(int storyID) { this->storyID = storyID; } 54 /** sets the story id of the current entity, this enables it to be identified in a global context. @returns the story id */ 55 inline int getStoryID() { this->storyID = storyID; } 56 /** sets the id of the next story entity: StoryEntities can choose their following entity themselfs. 57 * the entity id defined here will be startet after this entity ends. this can be convenient if you 58 * want to have a non linear story with switches. 59 * @param nextStoryID the story id of the next StoryEntity */ 60 inline void setNextStoryID(int nextStoryID) { this->nextStoryID = nextStoryID; } 61 /** gets the story id of the current entity @returns story id */ 62 inline int getNextStoryID() { return this->nextStoryID; } 57 63 58 void setNextStoryID(int nextStoryID); 59 int getNextStoryID(); 64 60 65 61 66 protected:
Note: See TracChangeset
for help on using the changeset viewer.