Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2009, 2:39:16 AM (15 years ago)
Author:
bknecht
Message:

we do now save what level you chose last time and will preselect it for you on restart ;-). Of course you can still use —level or -l to choose your level in the old way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/Game.h

    r2946 r3036  
    4646    static bool MACRO_CONCATENATE(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(name))
    4747
     48// tolua_begin
    4849namespace orxonox
    4950{
     
    5253        Main class responsible for running the game.
    5354    */
    54     class _CoreExport Game : public OrxonoxClass
     55    class _CoreExport Game
     56    // tolua_end
     57        : public OrxonoxClass
     58    // tolua_begin
    5559    {
     60    //tolua_end
    5661    public:
    5762        Game(int argc, char** argv);
     
    7883        static bool addGameState(GameState* state);
    7984        static void destroyStates();
    80         static Game& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
     85        static Game& getInstance() { assert(singletonRef_s); return *singletonRef_s; } //tolua_export
     86
     87        void setLevel(std::string levelName); //tolua_export
     88        const std::string& getLevel(); //tolua_export
    8189
    8290    private:
     
    114122        unsigned int                    statisticsRefreshCycle_;
    115123        unsigned int                    statisticsAvgLength_;
     124        std::string                     levelName_;
    116125
    117126        static std::map<std::string, GameState*> allStates_s;
    118127        static Game* singletonRef_s;        //!< Pointer to the Singleton
     128        // tolua_begin
    119129    };
    120130}
    121 
     131//tolua_end
    122132#endif /* _Game_H__ */
Note: See TracChangeset for help on using the changeset viewer.