Changeset 10439 in orxonox.OLD for trunk/src/world_entities/test_entity.cc
- Timestamp:
- Jan 28, 2007, 1:58:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/test_entity.cc
r10368 r10439 26 26 #include "debug.h" 27 27 28 #include "track/track.h" 29 28 30 29 31 … … 37 39 CREATE_FACTORY(TestEntity); 38 40 41 #include "script_class.h" 42 CREATE_SCRIPTABLE_CLASS(TestEntity, 43 addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX)) 44 ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY)) 45 ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ)) 46 ->addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor)) 47 ->addMethod("setAbsDir", Executor4<PNode, lua_State*,float,float,float,float>(&PNode::setAbsDir)) 48 ); 39 49 40 50 … … 53 63 TestEntity::TestEntity(const TiXmlElement* root) 54 64 { 55 this->init();56 57 65 if( root != NULL) 58 66 this->loadParams(root); 67 68 this->init(); 59 69 } 60 70 … … 74 84 this->registerObject(this, TestEntity::_objectList); 75 85 this->toList(OM_GROUP_00); 86 87 //add to track 88 if(this->entityTrack) 89 this->setParent(this->entityTrack->getTrackNode()); 90 76 91 } 77 92 … … 121 136 glPopMatrix(); 122 137 glPopAttrib(); 138 139 140 if( this->entityTrack != NULL) 141 this->entityTrack->drawGraph(); 142 123 143 } 124 144 … … 128 148 void TestEntity::tick (float time) 129 149 { 150 if(this->entityTrack) 151 this->entityTrack->tick(time); 130 152 131 153
Note: See TracChangeset
for help on using the changeset viewer.