Changeset 10319 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Jan 24, 2007, 2:04:05 AM (18 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world.cc
r10314 r10319 65 65 addMethod("setPlaymode", Executor1<GameWorld, lua_State*,const std::string&>(&GameWorld::setPlaymode)) 66 66 ->addMethod("setSoundtrack", Executor1<GameWorld, lua_State*, const std::string&>(&GameWorld::setSoundtrack)) 67 ->addMethod("getStoryID", Executor0ret<StoryEntity, lua_State*, int>(&StoryEntity::getStoryID)) 68 ->addMethod("setNextStoryName", Executor1ret<StoryEntity, lua_State*, bool, const std::string&>(&StoryEntity::setNextStoryName)) 69 ->addMethod("stop", Executor0ret<GameWorld, lua_State*, bool>(&GameWorld::stop)) 67 70 ); 68 71 … … 305 308 if (this->dataTank->music != NULL) 306 309 this->dataTank->music->play(); 310 311 PNode::getNullParent()->updateNode(0.01); 312 PNode::getNullParent()->updateNode(0.01); 313 307 314 308 315 while( this->bRunning) /* @todo implement pause */ -
trunk/src/story_entities/story_entity.cc
r9869 r10319 132 132 this->nextStoryID = nextStoryID; 133 133 } 134 135 136 /** 137 * sets the id of the next story entity by name 138 * @param nextStoryName the story name of the next StoryEntity 139 */ 140 bool StoryEntity::setNextStoryName(const std::string& nextStoryName) 141 { 142 for (ObjectList<StoryEntity>::const_iterator it = StoryEntity::objectList().begin(); 143 it != StoryEntity::objectList().end(); 144 ++it) 145 if( (*it)->getName().compare(nextStoryName) == 0) 146 { 147 this->setNextStoryID( (*it)->getStoryID() ); 148 return true; 149 } 150 151 return false; 152 } 153 134 154 135 155 /** -
trunk/src/story_entities/story_entity.h
r9869 r10319 67 67 const std::string& getLoadFile() const { return this->loadFile; } 68 68 69 bool setNextStoryName(const std::string& nextStoryName); 69 70 void setNextStoryID(int nextStoryID); 70 71 /** gets the story id of the current entity @returns story id */
Note: See TracChangeset
for help on using the changeset viewer.