Changeset 7391 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Apr 27, 2006, 12:52:35 AM (19 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world.cc
r7374 r7391 83 83 84 84 this->dataXML = NULL; 85 this->gameRules = NULL; 85 86 } 86 87 … … 274 275 /* update the state */ 275 276 this->update (); 277 /* check the game rules */ 278 this->checkGameRules(); 276 279 /* draw everything */ 277 280 this->display (); … … 417 420 } 418 421 422 423 /** 424 * check the game rules: winning conditions, etc. 425 * 426 */ 427 void GameWorld::checkGameRules() 428 { 429 if( this->gameRules) 430 this->gameRules->tick(this->dtS); 431 } 432 433 419 434 /** 420 435 * render the current frame … … 474 489 engine->draw(); 475 490 476 477 491 // draw the game ruls 478 492 if( likely(this->dataTank->gameRule != NULL)) -
trunk/src/story_entities/game_world.h
r7374 r7391 14 14 class OrxShell::Shell; 15 15 class WorldEntity; 16 class GameRules; 16 17 17 18 /** How many frames time values to keep … … 66 67 virtual void tick(); 67 68 virtual void update(); 69 virtual void checkGameRules(); 68 70 virtual void collide(); 69 71 … … 93 95 Uint32 frameTimes[TICK_SMOOTH_VALUE];//!< The time used for the last TICK_SMOOTH_VALUE's frames. 94 96 97 GameRules* gameRules; //!< Pointer to the data structure containig the game rules 98 95 99 96 100 private: -
trunk/src/story_entities/game_world_data.cc
r7370 r7391 379 379 while( element != NULL) 380 380 { 381 PRINTF(4)("============ GameRules =="); 381 382 PRINTF(4)("creating %s\n", element->Value()); 382 383 BaseObject* created = Factory::fabricate(element);
Note: See TracChangeset
for help on using the changeset viewer.