- Timestamp:
- Mar 7, 2010, 11:27:20 PM (15 years ago)
- Location:
- code/branches/tutorial
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial
- Property svn:mergeinfo changed
/code/branches/tutorial merged: 5841
- Property svn:mergeinfo changed
-
code/branches/tutorial/src/orxonox/worldentities/Drone.cc
r6483 r6487 36 36 // put your code in here: 37 37 // create the factory for the drone 38 CreateFactory(Drone);39 38 40 39 /** … … 46 45 // put your code in here: 47 46 // - register the drone class to the core 48 // - create a new controller and pass our this pointer to it as creator49 47 this->myController_ = 0; 50 RegisterObject(Drone);51 48 52 49 this->localLinearAcceleration_.setValue(0, 0, 0); … … 58 55 this->setCollisionType(WorldEntity::Dynamic); 59 56 60 myController_ = new DroneController(static_cast<BaseObject*>(this)); 57 myController_ = new DroneController(static_cast<BaseObject*>(this)); //!< Creates a new controller and passes our this pointer to it as creator. 61 58 } 62 59 … … 80 77 SUPER(Drone, XMLPort, xmlelement, mode); 81 78 82 XMLPortParam(Drone, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode); 83 XMLPortParam(Drone, "auxilaryThrust", setAuxilaryThrust, getAuxilaryThrust, xmlelement, mode); 84 XMLPortParam(Drone, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode); 79 // put your code in here: 80 // make sure you add the variables primaryThrust_, auxilaryThrust_ and rotationThrust_ to xmlport 81 // make sure that the set- and get-functions exist. 82 // variables can be added by the following command 83 // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunction, getFunction, xmlelement, mode) 84 85 85 } 86 86
Note: See TracChangeset
for help on using the changeset viewer.