Changeset 1688 for code/branches/gui/src/core/GameState.cc
- Timestamp:
- Aug 31, 2008, 5:50:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/core/GameState.cc
r1674 r1688 45 45 GameState::GameState(const std::string& name) 46 46 : name_(name) 47 , parent_(0)47 //, parent_(0) 48 48 , activeChild_(0) 49 //, bPause Parent_(false)49 //, bPausegetParent()(false) 50 50 { 51 51 Operations temp = {false, false, false, false, false}; … … 103 103 104 104 // mark us as parent 105 state-> parent_ = this;105 state->setParent(this); 106 106 } 107 107 … … 178 178 this->allChildren_[grandchild->getName()] = grandchild; 179 179 this->grandchildrenToChildren_[grandchild] = child; 180 if (this-> parent_)181 this-> parent_->grandchildAdded(this, grandchild);180 if (this->getParent()) 181 this->getParent()->grandchildAdded(this, grandchild); 182 182 } 183 183 … … 196 196 this->allChildren_.erase(grandchild->getName()); 197 197 this->grandchildrenToChildren_.erase(grandchild); 198 if (this-> parent_)199 this-> parent_->grandchildRemoved(grandchild);198 if (this->getParent()) 199 this->getParent()->grandchildRemoved(grandchild); 200 200 } 201 201 … … 208 208 GameState* GameState::getState(const std::string& name) 209 209 { 210 if (this-> parent_)211 return this-> parent_->getState(name);210 if (this->getParent()) 211 return this->getParent()->getState(name); 212 212 else 213 213 { … … 227 227 GameState* GameState::getRoot() 228 228 { 229 if (this-> parent_)230 return this-> parent_->getRoot();229 if (this->getParent()) 230 return this->getParent()->getRoot(); 231 231 else 232 232 return this;
Note: See TracChangeset
for help on using the changeset viewer.