Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2008, 5:50:42 PM (16 years ago)
Author:
rgrieder
Message:

Modified the GameState hierarchy so that you can get the parent with the actual type by calling getParent().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/gamestates/GSLevel.cc

    r1686 r1688  
    4545{
    4646    GSLevel::GSLevel(const std::string& name)
    47         : GameState(name)
     47        : GameStateTyped<GSGraphics>(name)
    4848        , timeFactor_(1.0f)
    4949        , sceneManager_(0)
     
    6868
    6969        // create Ogre SceneManager for the level
    70         this->sceneManager_ = GraphicsEngine::getInstance().getOgreRoot()->
    71             createSceneManager(Ogre::ST_GENERIC, "LevelSceneManager");
     70        this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, "LevelSceneManager");
    7271        COUT(4) << "Created SceneManager: " << sceneManager_->getName() << std::endl;
     72
     73        // temporary hack
    7374        GraphicsEngine::getInstance().setLevelSceneManager(this->sceneManager_);
    7475
     
    9899        delete this->radar_;
    99100
    100         GraphicsEngine::getInstance().getOgreRoot()->destroySceneManager(this->sceneManager_);
     101        Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
    101102
    102103        inputState_->setHandler(0);
Note: See TracChangeset for help on using the changeset viewer.