Changeset 3629 in orxonox.OLD for orxonox/trunk/src/story_entities
- Timestamp:
- Mar 22, 2005, 11:15:54 AM (20 years ago)
- Location:
- orxonox/trunk/src/story_entities
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/campaign.cc
r3608 r3629 18 18 19 19 #include "campaign.h" 20 21 #include "story_entity.h" 22 20 23 #include "world.h" 21 24 #include "camera.h" 22 //#include "story_entity.h" 25 23 26 #include "list.h" 24 27 … … 31 34 this->isInit = false; 32 35 } 36 33 37 34 38 Campaign::~Campaign () {} … … 59 63 { 60 64 se->displayLoadScreen(); 65 se->preLoad(); 61 66 se->load(); 62 67 se->init(); -
orxonox/trunk/src/story_entities/story_entity.cc
r3472 r3629 72 72 73 73 74 /** 75 \brief stuff that will have to be initialized before load 76 77 this gives all storyentities the possibility to init stuff before the 78 load function, where all the stuff is been made ready for start 79 */ 80 ErrorMessage StoryEntity::preLoad() 81 {} 82 83 /** 84 \brief loads the current entity 85 86 this is here to enable you loading maps into the entities. for all other actions you 87 should take the init() function. 88 load() is exec before init() 89 */ 90 ErrorMessage StoryEntity::load() 91 {} 92 93 74 94 /** 75 95 \brief initialize the entity before use. … … 78 98 After execution of this function, the Entity is ready to be played/executed, 79 99 this shifts the initialisation work before the execution - very important... 100 init() is exec shortly before start() 80 101 */ 81 102 ErrorMessage StoryEntity::init() 82 103 {} 83 104 84 85 /**86 \brief loads the current entity87 88 this is here to enable you loading maps into the entities. for all other actions you89 should take the init() function.90 */91 ErrorMessage StoryEntity::load()92 {}93 105 94 106 /** -
orxonox/trunk/src/story_entities/story_entity.h
r3608 r3629 23 23 bool isPaused; //! is true if the entity is paused 24 24 25 virtual ErrorMessage preLoad(); 25 26 virtual ErrorMessage load(); 26 27 virtual ErrorMessage init(); -
orxonox/trunk/src/story_entities/world.cc
r3621 r3629 89 89 { 90 90 this->worldReference = world; 91 if( world != NULL)91 if( world != NULL) 92 92 { 93 93 this->worldIsInitialized = true; … … 128 128 World::World (int worldID) 129 129 { 130 printf(">>>>>>>>>>>>>>>>>WORLD::WORLD called NEW WORLD created\n"); 130 131 this->init(NULL, worldID); 131 132 } … … 153 154 154 155 /** 155 \brief initializes a new World 156 \brief initializes the world. 157 158 set all stuff here that is world generic and does not use to much memory 159 because the real init() function StoryEntity::init() will be called 160 shortly before start of the game. 161 since all worlds are initiated/referenced before they will be started. 162 NO LEVEL LOADING HERE - NEVER! 156 163 */ 157 164 void World::init(char* name, int worldID) … … 159 166 this->setClassName ("World"); 160 167 161 162 this->worldName = name; 168 this->worldName = "Just a test level"; 163 169 this->debugWorldNr = worldID; 164 170 this->entities = new tList<WorldEntity>(); 165 171 } 172 173 174 /** 175 \brief this is executed before load 176 177 since the load function sometimes needs data, that has been init before 178 the load and after the proceeding storyentity has finished 179 */ 180 ErrorMessage World::preLoad() 181 { 166 182 /* init the world interface */ 167 183 WorldInterface* wi = WorldInterface::getInstance(); … … 391 407 } 392 408 393 /** 394 \brief initializes a new World 409 410 /** 411 \brief initializes a new World shortly before start 412 413 this is the function, that will be loaded shortly before the world is 414 started 395 415 */ 396 416 ErrorMessage World::init() … … 400 420 cn->addToWorld(this); 401 421 cn->enable(true); 402 403 422 } 404 423 -
orxonox/trunk/src/story_entities/world.h
r3620 r3629 62 62 63 63 /* classes from story-entity */ 64 virtual ErrorMessage preLoad(); 64 65 virtual ErrorMessage load (); 65 66 virtual ErrorMessage init ();
Note: See TracChangeset
for help on using the changeset viewer.