Changeset 6992 in orxonox.OLD for trunk/src/story_entities/story_entity.cc
- Timestamp:
- Feb 2, 2006, 10:55:43 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/story_entity.cc
r6878 r6992 22 22 #include "story_entity.h" 23 23 24 #include "resource_manager.h" 24 25 #include "load_param.h" 25 26 … … 39 40 this->isRunning = false; 40 41 42 this->loadFile = NULL; 41 43 this->storyID = -1; 42 44 this->description = NULL; … … 66 68 .describe("A Unique Identifier for this StoryEntity"); 67 69 70 LoadParam(root, "path", this, StoryEntity, setLoadFile) 71 .describe("DEPRICATED FORM OF file. The Filename of this StoryEntity (relative from the data-dir)"); 72 73 LoadParam(root, "file", this, StoryEntity, setLoadFile) 74 .describe("The Filename of this StoryEntity (relative from the data-dir)"); 75 68 76 LoadParam(root, "nextid", this, StoryEntity, setNextStoryID) 69 77 .describe("Sets the ID of the next StoryEntity"); … … 86 94 87 95 /** 96 * sets the track path of this world 97 * @param name the name of the path 98 */ 99 void StoryEntity::setLoadFile(const char* fileName) 100 { 101 if (this->loadFile) 102 delete this->loadFile; 103 if (ResourceManager::isFile(fileName)) 104 { 105 this->loadFile = new char[strlen(fileName)+1]; 106 strcpy(this->loadFile, fileName); 107 } 108 else 109 this->loadFile = ResourceManager::getFullName(fileName); 110 } 111 112 113 /** 88 114 * sets the descroption of this StoryEntity 89 115 * @param name name … … 101 127 } 102 128 129 /** 130 * sets the id of the next story entity: StoryEntities can choose their following entity themselfs. 131 * the entity id defined here will be startet after this entity ends. this can be convenient if you 132 * want to have a non linear story with switches. 133 * @param nextStoryID the story id of the next StoryEntity 134 */ 135 void StoryEntity::setNextStoryID(int nextStoryID) 136 { 137 this->nextStoryID = nextStoryID; 138 } 103 139 104 140 /**
Note: See TracChangeset
for help on using the changeset viewer.