Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2008, 5:22:33 PM (16 years ago)
Author:
FelixSchulthess
Message:

made HUD singleton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/Orxonox.cc

    r1374 r1387  
    180180  {
    181181    // keep in mind: the order of deletion is very important!
    182     if (this->orxonoxHUD_)
    183       delete this->orxonoxHUD_;
     182//    if (this->orxonoxHUD_)
     183//      delete this->orxonoxHUD_;
    184184    Loader::close();
    185185    InputManager::destroy();
     
    348348    // Load the HUD
    349349    COUT(3) << "Orxonox: Loading HUD..." << std::endl;
    350     orxonoxHUD_ = new HUD(1);
     350    orxonoxHUD_ = &HUD::getSingleton();
    351351
    352352    COUT(3) << "Orxonox: Loading Console..." << std::endl;
     
    487487//      orxonoxHUD_->setRocket2(ogreRoot.getCurrentFrameNumber());
    488488      if (eventTimes[3].back() - eventTimes[3].front() != 0)
    489         orxonoxHUD_->setFPS(50000.0f/(eventTimes[3].back() - eventTimes[3].front()));
     489        HUD::setFPS(50000.0f/(eventTimes[3].back() - eventTimes[3].front()));
    490490
    491491      // Iterate through all Tickables and call their tick(dt) function
Note: See TracChangeset for help on using the changeset viewer.