Changes between Version 58 and Version 59 of pps/tutorial
- Timestamp:
- Mar 6, 2014, 3:13:52 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pps/tutorial
v58 v59 91 91 RegisterObject(ClassX); 92 92 }}} 93 4. Now go to the function called ''XMLPort''. ''XMLPort'' allows you to specify how your class can be instantiated (i.e. how an object can be created) purely through XML. This is important when we want to create levels, which in Orxonox are specified in XML files. 93 94 The next part happens inside the ''XMLPort'' function. ''XMLPort'' allows you to specify how your class can be instantiated (i.e. how an object can be created) purely through XML. This is important when we want to create levels, which in Orxonox are specified in XML files. 94 95 The AutonomousDrone has two variables called ''auxiliaryThrust_'' and ''rotationThrust_'' defined in the header file (''src/orxonox/worldentities/AutonomousDrone.h''). To be able to set these variables to values from XML, we need 95 96 to add some code to the XMLPort function. There is already an example for the ''primaryThrust_'' variable. 96 97 97 Add similar calls for ''auxiliaryThrust_'' and ''rotationThrust_'' using the following scheme:98 4. Add similar calls for ''auxiliaryThrust_'' and ''rotationThrust_'' using the following scheme: 98 99 99 100 {{{