Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 25, 2009, 5:23:00 PM (15 years ago)
Author:
rgrieder
Message:

Implemented new GameState concept. It doesn't differ that much from the old one, but there's still lots of changes.
The most important change is that one GameState can occur multiple times in the hierarchy.

Short log:

  • No RootGameState anymore. Simply the highest is root.
  • Game::requestGameState(name) can refer to the parent, grandparent, great-grandparent, etc. or one of the children.
  • Requested states are saved. So if you select "level", the next request (even right after the call) will be relative to "level"
  • Game::popState() will simply unload the current one
  • Re added Main.cc again because Game as well as GameState have been moved to the core
  • Adapted all GameStates to the new system

Things should already work, except for network support because standalone only works with a little hack.
We can now start creating a better hierarchy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/gamestates/GSClient.h

    r2817 r2844  
    3333#include "core/GameState.h"
    3434#include "network/NetworkPrereqs.h"
    35 #include "GSLevel.h"
    3635
    3736namespace orxonox
    3837{
    39     class _OrxonoxExport GSClient : public GameState, public GSLevel
     38    class _OrxonoxExport GSClient : public GameState
    4039    {
    4140    public:
    42         GSClient();
     41        GSClient(const std::string& name);
    4342        ~GSClient();
    4443
     44        void activate();
     45        void deactivate();
     46        void update(const Clock& time);
    4547
    4648    private:
    47         void enter();
    48         void leave();
    49         void ticked(const Clock& time);
    50 
    5149        Client* client_;
    5250    };
Note: See TracChangeset for help on using the changeset viewer.