Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 11:58:01 PM (15 years ago)
Author:
rgrieder
Message:

Merged most of the core4 revisions back to the trunk except for:

  • orxonox_cast
  • all the radical changes in the input library
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/GameState.h

    r3196 r3280  
    4545    /**
    4646    @brief
     47        Helper class to group construction parameters for better genericity.
     48    */
     49    struct GameStateConstrParams
     50    {
     51        std::string name;
     52        bool bIgnoreTickTime;
     53    };
     54
     55    /**
     56    @brief
    4757        An implementation of a tree to manage game states.
    4858        This leads to a certain hierarchy that is created at runtime.
     
    7787
    7888    public:
    79         GameState(const std::string& name, bool countTicktime = true);
     89        GameState(const GameStateConstrParams& params);
    8090        virtual ~GameState();
    8191
     
    8494        GameState* getParent()       const { return this->parent_; }
    8595
    86         bool getCountTickTime()      const { return this->bCountTickTime_; }
     96        bool ignoreTickTime()        const { return this->bIgnoreTickTime_; }
    8797
    8898        void addChild(GameState* state);
     
    90100
    91101    protected:
    92         virtual void activate() = 0;
    93         virtual void deactivate() = 0;
    94         virtual void update(const Clock& time) = 0;
     102        virtual void activate() { }
     103        virtual void deactivate() { }
     104        virtual void update(const Clock& time) { }
    95105
    96106    private:
     
    103113        const std::string                        name_;
    104114        State                                    activity_;
    105         const bool                               bCountTickTime_;
     115        const bool                               bIgnoreTickTime_;
    106116        GameState*                               parent_;
    107117        std::map<std::string, GameState*>        children_;
Note: See TracChangeset for help on using the changeset viewer.