Changeset 6991 for code/branches/ai/src/orxonox/worldentities/Drone.cc
- Timestamp:
- May 27, 2010, 10:16:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai/src/orxonox/worldentities/Drone.cc
r6918 r6991 40 40 namespace orxonox 41 41 { 42 // put your code in here:43 // create the factory for the drone44 42 CreateFactory(Drone); 45 43 /** … … 49 47 Drone::Drone(BaseObject* creator) : Pawn(creator) 50 48 { 51 // put your code in here:52 // - register the drone class to the core53 49 RegisterObject(Drone); 54 50 … … 57 53 this->localLinearAcceleration_.setValue(0, 0, 0); 58 54 this->localAngularAcceleration_.setValue(0, 0, 0); 59 this->primaryThrust_ = 100; 60 this->auxilaryThrust_ = 100; 61 this->rotationThrust_ = 10; 62 55 this->setRadarVisibility(false); 63 56 this->setCollisionType(WorldEntity::Dynamic); 64 57 … … 85 78 void Drone::XMLPort(Element& xmlelement, XMLPort::Mode mode) 86 79 { 87 // this calls the XMLPort function of the parent class88 80 SUPER(Drone, XMLPort, xmlelement, mode); 89 81 90 // put your code in here:91 // make sure you add the variables primaryThrust_, auxilaryThrust_ and rotationThrust_ to xmlport92 // make sure that the set- and get-functions exist.93 // variables can be added by the following command94 // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunction, getFunction, xmlelement, mode)95 82 XMLPortParam(Drone, "primaryThrust_", setPrimaryThrust, getPrimaryThrust, xmlelement, mode); 96 83 XMLPortParam(Drone, "auxilaryThrust_", setAuxilaryThrust, getAuxilaryThrust, xmlelement, mode); 97 84 XMLPortParam(Drone, "rotationThrust_", setRotationThrust, getRotationThrust, xmlelement, mode); 98 99 85 XMLPortParam(Drone, "maxDistanceToOwner_", setMaxDistanceToOwner, getMaxDistanceToOwner, xmlelement, mode); 86 XMLPortParam(Drone, "minDistanceToOwner_", setMinDistanceToOwner, getMinDistanceToOwner, xmlelement, mode); 100 87 } 101 88
Note: See TracChangeset
for help on using the changeset viewer.