Changeset 2428 for code/branches/objecthierarchy2/src/core/BaseObject.h
- Timestamp:
- Dec 13, 2008, 10:54:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy2/src/core/BaseObject.h
r2369 r2428 135 135 inline Scene* getScene() const { return this->scene_; } 136 136 137 inline void setGametype(Gametype* gametype) { this->oldGametype_ = this->gametype_; this->gametype_ = gametype; this->changedGametype(); } 137 inline void setGametype(Gametype* gametype) 138 { 139 if (gametype != this->gametype_) 140 { 141 this->oldGametype_ = this->gametype_; 142 this->gametype_ = gametype; 143 this->changedGametype(); 144 } 145 } 138 146 inline Gametype* getGametype() const { return this->gametype_; } 139 147 inline Gametype* getOldGametype() const { return this->oldGametype_; } 140 virtual inlinevoid changedGametype() {}148 virtual void changedGametype() {} 141 149 142 150 void fireEvent(); … … 197 205 SUPER_FUNCTION(6, BaseObject, changedMainState, false); 198 206 SUPER_FUNCTION(9, BaseObject, changedName, false); 207 SUPER_FUNCTION(10, BaseObject, changedGametype, false); 199 208 } 200 209
Note: See TracChangeset
for help on using the changeset viewer.