Changeset 10088 in orxonox.OLD for branches/playability/src/world_entities
- Timestamp:
- Dec 18, 2006, 1:28:49 AM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/world_entity.cc
r9869 r10088 28 28 29 29 #include "util/loading/load_param.h" 30 #include "loading/load_param_xml.h" 31 #include "util/loading/factory.h" 32 30 33 #include "obb_tree.h" 31 34 … … 40 43 #include "kill.h" 41 44 #include "debug.h" 45 46 #include "track/track.h" 42 47 43 48 #include "projectiles/projectile.h" … … 83 88 this->bOnGround = false; 84 89 90 // Track of this entity 91 this->entityTrack = NULL; 92 85 93 // registering default reactions: 86 94 this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, /* WorldEntity::staticClassID(), */ Projectile::staticClassID()); … … 136 144 .defaultValues("", 1.0f, 0); 137 145 146 // Entity Attributes 138 147 LoadParam(root, "maxHealth", this, WorldEntity, setHealthMax) 139 148 .describe("The Maximum health that can be loaded onto this entity") … … 145 154 146 155 LoadParam(root, "list", this, WorldEntity, toListS); 156 157 158 // Track 159 LoadParamXML(root, "Track", this, WorldEntity, addTrack) 160 .describe("creates and adds a track to this WorldEntity"); 161 } 162 163 164 /** 165 * this functions adds a track to this workd entity. This can be usefull, if you like this WE to follow a some waypoints. 166 * here the track is created and further initializing left for the Track itself 167 */ 168 void WorldEntity::addTrack(const TiXmlElement* root) 169 { 170 LOAD_PARAM_START_CYCLE(root, element); 171 { 172 PRINTF(4)("element is: %s\n", element->Value()); 173 Factory::fabricate(element); 174 } 175 LOAD_PARAM_END_CYCLE(element); 147 176 } 148 177 -
branches/playability/src/world_entities/world_entity.h
r9869 r10088 32 32 class CollisionHandle; 33 33 class Collision; 34 class Track; 35 class TiXmlElement; 34 36 35 37 … … 174 176 private: 175 177 void updateHealthWidget(); 178 void addTrack(const TiXmlElement* root); 176 179 177 180 private: … … 218 221 bool bOnGround; //!< true if this entity is standing on the ground 219 222 223 224 Track* entityTrack; //!< this is the track this entity follows (or NULL if none) 225 220 226 protected: 221 227 Vector velocity; //!< speed of the entity
Note: See TracChangeset
for help on using the changeset viewer.