Changeset 7163 for code/trunk/src/libraries/core/BaseObject.h
- Timestamp:
- Aug 11, 2010, 8:55:13 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/BaseObject.h
r6800 r7163 51 51 class Scene; 52 52 class Gametype; 53 class Level; 53 54 54 55 //! The BaseObject is the parent of all classes representing an instance in the game. … … 154 155 virtual void changedGametype() {} 155 156 157 inline void setLevel(const SmartPtr<Level>& level) 158 { 159 if (level != this->level_) 160 { 161 this->level_ = level; 162 this->changedLevel(); 163 } 164 } 165 inline const SmartPtr<Level>& getLevel() const { return this->level_; } 166 virtual void changedLevel() {} 167 156 168 void addEventSource(BaseObject* source, const std::string& state); 157 169 void removeEventSource(BaseObject* source); … … 179 191 EventState* getEventState(const std::string& name) const; 180 192 181 std::string name_; //!< The name of the object 182 std::string oldName_; //!< The old name of the object 183 mbool bActive_; //!< True = the object is active 184 mbool bVisible_; //!< True = the object is visible 185 std::string mainStateName_; 186 Functor* mainStateFunctor_; 193 std::string name_; //!< The name of the object 194 std::string oldName_; //!< The old name of the object 195 mbool bActive_; //!< True = the object is active 196 mbool bVisible_; //!< True = the object is visible 197 std::string mainStateName_; 198 Functor* mainStateFunctor_; 199 std::set<std::string> networkTemplateNames_; 187 200 188 201 private: … … 209 222 SmartPtr<Gametype> gametype_; 210 223 Gametype* oldGametype_; 224 SmartPtr<Level> level_; 211 225 std::set<Template*> templates_; 212 226
Note: See TracChangeset
for help on using the changeset viewer.