Changeset 10362 in orxonox.OLD for branches/playability.new/src/world_entities/world_entity.cc
- Timestamp:
- Jan 25, 2007, 3:05:01 AM (17 years ago)
- Location:
- branches/playability.new
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability.new
- Property svn:ignore
-
old new 10 10 autom4te.cache 11 11 aclocal.m4 12 tags 13 test.bmp 14 config.sub 15 config.guess 16 OrxonoxPlayability.kdevses 17 OrxonoxPlayability.kdevelop.pcs
-
- Property svn:ignore
-
branches/playability.new/src/world_entities/world_entity.cc
r10314 r10362 32 32 33 33 #include "util/loading/load_param.h" 34 #include "loading/load_param_xml.h" 35 #include "util/loading/factory.h" 36 34 37 #include "obb_tree.h" 35 38 36 39 #include "elements/glgui_energywidget.h" 40 #include "elements/glgui_energywidgetvertical.h" 37 41 38 42 #include "state.h" … … 44 48 #include "kill.h" 45 49 #include "debug.h" 50 51 #include "track/track.h" 46 52 47 53 #include "projectiles/projectile.h" … … 86 92 this->_bOnGround = false; 87 93 94 // Track of this entity 95 this->entityTrack = NULL; 96 88 97 // registering default reactions: 89 98 this->subscribeReaction(CoRe::CREngine::CR_OBJECT_DAMAGE, Projectile::staticClassID()); … … 148 157 .describe("the fileName of the object information file (optional)"); 149 158 159 // Entity Attributes 150 160 LoadParam(root, "maxHealth", this, WorldEntity, setHealthMax) 151 161 .describe("The Maximum health that can be loaded onto this entity") … … 157 167 158 168 LoadParam(root, "list", this, WorldEntity, toListS); 169 170 171 // Track 172 LoadParamXML(root, "Track", this, WorldEntity, addTrack) 173 .describe("creates and adds a track to this WorldEntity"); 174 } 175 176 177 /** 178 * this functions adds a track to this workd entity. This can be usefull, if you like this WE to follow a some waypoints. 179 * here the track is created and further initializing left for the Track itself 180 */ 181 void WorldEntity::addTrack(const TiXmlElement* root) 182 { 183 // The problem we have is most likely here. The track should be constructed WITH the XML-Code 184 this->entityTrack = new Track(root); 185 this->setParent(this->entityTrack->getTrackNode()); 186 this->entityTrack->getTrackNode()->setParentMode(PNODE_ALL); 187 /*LOAD_PARAM_START_CYCLE(root, element); 188 { 189 PRINTF(4)("element is: %s\n", element->Value()); 190 Factory::fabricate(element); 191 } 192 LOAD_PARAM_END_CYCLE(element);*/ 193 194 159 195 } 160 196 … … 613 649 */ 614 650 void WorldEntity::tick(float time) 615 {} 651 { 652 } 616 653 617 654 … … 652 689 this->models[0]->draw(); 653 690 } 691 692 //if (this->entityTrack) 693 //this->entityTrack->drawGraph(0.02); 654 694 655 695 // if( this->aabbNode != NULL) … … 721 761 if (this->healthWidget == NULL) 722 762 { 723 this->healthWidget = new OrxGui::GLGuiEnergyWidget ();724 this->healthWidget->setDisplayedName(std::string(this->getClassName()) + " Energy:");725 this->healthWidget->setSize2D(30,400);726 this->healthWidget->setAbsCoor2D(10,100);763 this->healthWidget = new OrxGui::GLGuiEnergyWidgetVertical(); 764 //this->healthWidget->setDisplayedName("Health"); 765 //this->healthWidget->setSize2D(100,20); 766 //this->healthWidget->setAbsCoor2D(100,200); 727 767 728 768 this->updateHealthWidget(); … … 773 813 void WorldEntity::hit(float damage, WorldEntity* killer) 774 814 { 815 775 816 this->decreaseHealth(damage); 776 817
Note: See TracChangeset
for help on using the changeset viewer.