Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3551 in orxonox.OLD for orxonox/trunk/src/story_entities


Ignore:
Timestamp:
Mar 14, 2005, 11:46:50 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: renamed all timing functions to tick() - cleanede up world

Location:
orxonox/trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3548 r3551  
    285285
    286286            break;
    287 
    288 
    289287          }
    290288        default:
     
    632630  p4->debug ();
    633631 
    634   p1->update (1);
     632  p1->update ();
    635633
    636634  printf ("World::debug() - update\n");
     
    641639
    642640  p2->shiftCoor (new Vector(-1, -1, -1));
    643   p1->update (2);
     641  p1->update ();
    644642
    645643  p1->debug ();
     
    651649
    652650
    653  p1->update (2);
     651 p1->update ();
    654652
    655653  p1->debug ();
     
    696694          break;
    697695      // Process time
    698       this->timeSlice ();
     696      this->tick ();
     697      // Update the state
     698      this->update ();     
    699699      // Process collision
    700700      this->collide ();
     
    743743   a heart-beat.
    744744*/
    745 void World::timeSlice ()
     745void World::tick ()
    746746{
    747747  Uint32 currentFrame = SDL_GetTicks();
     
    778778     
    779779      /* update tick the rest */
    780       this->localCamera->timeSlice(dt);
     780      this->localCamera->tick(dt);
    781781      this->trackManager->tick(dt);
    782       this->nullParent->update (seconds);
    783782    }
    784783  this->lastFrame = currentFrame;
     784}
     785
     786
     787/**
     788   \brief this function gives the world a consistant state
     789
     790   after ticking (updating the world state) this will give a constistant
     791   state to the whole system.
     792*/
     793void World::update()
     794{
     795  this->nullParent->update ();
    785796}
    786797
     
    814825void World::spawn(WorldEntity* entity)
    815826{
    816   this->nullParent->addChild (entity);
    817827  this->entities->add (entity);
    818828  entity->postSpawn ();
     
    828838void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir)
    829839{
    830   this->nullParent->addChild (entity);
    831840  this->entities->add (entity);
    832841
     
    849858                  parentingMode mode)
    850859{
    851 
     860  this->nullParent = NullParent::getInstance();
    852861  if( parentNode != NULL)
    853862    {
  • orxonox/trunk/src/story_entities/world.h

    r3526 r3551  
    8484  void synchronize ();
    8585  void handleInput ();
    86   void timeSlice ();
     86  void tick ();
     87  void update ();
    8788  void collide ();
    8889  void draw ();
Note: See TracChangeset for help on using the changeset viewer.