Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2009, 1:32:40 PM (16 years ago)
Author:
rgrieder
Message:

Moved Game::getLevel to LevelManager::getStartLevel and Game::setLevel to LevelManager::setStartLevel.

Location:
code/branches/core4/src/orxonox/gamestates
Files:
5 edited

Legend:

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

    r3243 r3245  
    7171        , radar_(0)
    7272        , cameraManager_(0)
    73         , levelManager_(0)
    7473    {
    7574        RegisterObject(GSLevel);
     
    120119        if (GameMode::isMaster())
    121120        {
    122             // create the global LevelManager
    123             this->levelManager_ = new LevelManager();
    124 
    125121            this->loadLevel();
    126122        }
     
    202198        }
    203199
    204         if (this->levelManager_)
    205         {
    206             delete this->levelManager_;
    207             this->levelManager_ = 0;
    208         }
    209 
    210200        if (this->playerManager_)
    211201        {
     
    255245        CommandLine::getValue("level", &levelName);
    256246        if (levelName == "")
    257             startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + Game::getInstance().getLevel());
     247            startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + LevelManager::getInstance().getStartLevel());
    258248        else
    259249            startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + levelName);
  • code/branches/core4/src/orxonox/gamestates/GSLevel.h

    r3243 r3245  
    6868        Radar*                radar_;                   //!< represents the Radar (not the HUD part)
    6969        CameraManager*        cameraManager_;           //!< camera manager for this level
    70         LevelManager*         levelManager_;            //!< global level manager
    7170        PlayerManager*        playerManager_;           //!< player manager for this level
    7271        QuestManager*         questManager_;
  • code/branches/core4/src/orxonox/gamestates/GSMainMenu.cc

    r3243 r3245  
    6767
    6868        // show main menu
    69         GUIManager::getInstance().showGUI("mainmenu_2");
     69        GUIManager::getInstance().showGUI("mainmenu_3");
    7070        GUIManager::getInstance().setCamera(this->camera_);
    7171        GraphicsManager::getInstance().setCamera(this->camera_);
  • code/branches/core4/src/orxonox/gamestates/GSRoot.cc

    r3243 r3245  
    3737#include "interfaces/TimeFactorListener.h"
    3838#include "interfaces/Tickable.h"
     39#include "LevelManager.h"
    3940
    4041namespace orxonox
     
    8384        }
    8485
     86        // create the global LevelManager
     87        this->levelManager_ = new LevelManager();
     88
    8589        // Load level directly?
    8690        bool loadLevel = false;
     
    129133        }
    130134*/
     135
     136        delete this->levelManager_;
    131137    }
    132138
  • code/branches/core4/src/orxonox/gamestates/GSRoot.h

    r3243 r3245  
    5252
    5353    private:
    54         float                 timeFactor_;       //!< A factor that sets the gamespeed. 1 is normal.
     54        float                 timeFactor_;              //!< A factor that sets the gamespeed. 1 is normal.
    5555        bool                  bPaused_;
    5656        float                 timeFactorPauseBackup_;
     57
     58        LevelManager*         levelManager_;            //!< global level manager
    5759
    5860        // console commands
Note: See TracChangeset for help on using the changeset viewer.