Changeset 6371 in orxonox.OLD for branches/network/src
- Timestamp:
- Dec 31, 2005, 2:32:08 PM (19 years ago)
- Location:
- branches/network/src/story_entities
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/story_entities/campaign.cc
r6370 r6371 132 132 se->preStart(); 133 133 se->start(); 134 se->destroy();135 134 136 135 int nextWorldID = se->getNextStoryID(); … … 189 188 } 190 189 191 190 /* 192 191 ErrorMessage Campaign::destroy() 193 192 { … … 198 197 this->currentEntity = NULL; 199 198 } 200 } 199 }*/ 201 200 202 201 -
branches/network/src/story_entities/campaign.h
r5774 r6371 28 28 virtual ErrorMessage resume(); 29 29 virtual ErrorMessage stop(); 30 virtual ErrorMessage destroy();31 30 32 31 void addEntity(StoryEntity* se, int storyID); -
branches/network/src/story_entities/game_world.cc
r6370 r6371 406 406 } 407 407 408 /**409 * destroys the GameWorld410 */411 ErrorMessage GameWorld::destroy()412 {413 414 }415 408 416 409 /** -
branches/network/src/story_entities/game_world.h
r6370 r6371 44 44 virtual ErrorMessage pause(); 45 45 virtual ErrorMessage resume(); 46 virtual ErrorMessage destroy();47 46 48 47 virtual void displayLoadScreen(); -
branches/network/src/story_entities/story_entity.cc
r6153 r6371 23 23 24 24 25 25 /** 26 * default constructor initializes all needed data 27 */ 26 28 StoryEntity::StoryEntity () 27 29 { … … 33 35 } 34 36 37 38 /** deconstructor 39 */ 35 40 StoryEntity::~StoryEntity () {} 36 41 37 42 38 /**39 * sets the story ID40 41 sets the story id of the current entity, this enables it to be identified in a42 global context.43 */44 void StoryEntity::setStoryID(int storyID)45 {46 this->storyID = storyID;47 }48 49 50 /**51 * this reads the story id of the current entity52 * @returns the story entity id53 */54 int StoryEntity::getStoryID()55 {56 return this->storyID;57 }58 59 60 /**61 * sets the id of the next story entity62 63 StoryEntities can choose their following entity themselfs. the entity id defined here64 will be startet after this entity ends. this can be convenient if you want to have a65 non linear story with switches.66 */67 void StoryEntity::setNextStoryID(int nextStoryID)68 {69 this->nextStoryID = nextStoryID;70 }71 72 /**73 * gets the story id of the current entity74 * @returns story id75 */76 int StoryEntity::getNextStoryID()77 {78 return this->nextStoryID;79 } -
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.