Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2009, 2:10:44 PM (15 years ago)
Author:
rgrieder
Message:

Merged resource branch back to the trunk. Changes:

  • Automated graphics loading by evaluating whether a GameState requires it
  • Using native Tcl library (x3n)

Windows users: Update your dependency package!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/LevelManager.h

    r3304 r3370  
    3535#include <list>
    3636#include <string>
     37
     38#include "util/Singleton.h"
    3739#include "core/OrxonoxClass.h"
    3840
     
    4244    class _OrxonoxExport LevelManager
    4345    // tolua_end
    44         : public OrxonoxClass
     46        : public Singleton<LevelManager>, public OrxonoxClass
    4547    { // tolua_export
     48            friend class Singleton<LevelManager>;
    4649        public:
    4750            LevelManager();
     
    5558
    5659            void setDefaultLevel(const std::string& levelName); //tolua_export
    57             const std::string& getDefaultLevel(); //tolua_export
     60            const std::string& getDefaultLevel() const; //tolua_export
     61            void compileAvailableLevelList(); //tolua_export
     62            std::string getAvailableLevelListItem(unsigned int index) const; //tolua_export
    5863
    59             static LevelManager* getInstancePtr() { return singletonRef_s; }
    60             static LevelManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; } // tolua_export
     64            static LevelManager* getInstancePtr() { return singletonPtr_s; }
     65            static LevelManager& getInstance()    { return Singleton<LevelManager>::getInstance(); } // tolua_export
    6166
    6267        private:
     
    6671
    6772            std::list<Level*> levels_s;
     73            std::vector<std::string> availableLevels_;
    6874
    6975            // config values
    7076            std::string defaultLevelName_;
    7177
    72             static LevelManager* singletonRef_s;
     78            static LevelManager* singletonPtr_s;
    7379    }; // tolua_export
    7480} // tolua_export
Note: See TracChangeset for help on using the changeset viewer.