Changeset 3370 for code/trunk/src/core/GameState.h
- Timestamp:
- Jul 30, 2009, 2:10:44 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/resource (added) merged: 3328,3336-3340,3342-3350,3352-3366
- Property svn:mergeinfo changed
-
code/trunk/src/core/GameState.h
r3280 r3370 45 45 /** 46 46 @brief 47 Helper class to group construction parameters for better genericity.48 */49 struct GameStateConstrParams50 {51 std::string name;52 bool bIgnoreTickTime;53 };54 55 /**56 @brief57 47 An implementation of a tree to manage game states. 58 48 This leads to a certain hierarchy that is created at runtime. … … 87 77 88 78 public: 89 GameState(const GameState ConstrParams& params);79 GameState(const GameStateInfo& info); 90 80 virtual ~GameState(); 91 81 92 const std::string& getName() const { return name_; } 93 State getActivity() const { return this->activity_; } 94 GameState* getParent() const { return this->parent_; } 95 96 bool ignoreTickTime() const { return this->bIgnoreTickTime_; } 97 98 void addChild(GameState* state); 99 void removeChild(GameState* state); 82 const std::string& getName() const; 83 State getActivity() const { return activity_; } 84 const GameStateInfo& getInfo() const { return info_; } 100 85 101 86 protected: … … 105 90 106 91 private: 107 void setParent(GameState* state) { this->parent_ = state; }108 92 void setActivity(State activity); 109 93 void activateInternal(); … … 111 95 void updateInternal(const Clock& time); 112 96 113 const std::string name_; 114 State activity_; 115 const bool bIgnoreTickTime_; 116 GameState* parent_; 117 std::map<std::string, GameState*> children_; 97 const GameStateInfo& info_; 98 State activity_; 118 99 }; 119 100 }
Note: See TracChangeset
for help on using the changeset viewer.