Changeset 11661
- Timestamp:
- Dec 11, 2017, 4:06:56 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.cc
r11559 r11661 34 34 namespace orxonox 35 35 { 36 //TODO: Put your code in here: 37 // Create the factory for the drone. 36 38 37 RegisterClass(Arrow); 39 38 /** … … 45 44 Arrow::Arrow(Context* context) : ControllableEntity(context) 46 45 { 47 //TODO: Put your code in here:48 // Register the drone class to the core.49 46 RegisterObject(Arrow); 50 51 //this->myController_ = NULL;52 47 53 48 this->localLinearAcceleration_.setValue(0, 0, 0); … … 59 54 this->setCollisionType(CollisionType::Dynamic); 60 55 61 //this->myController_ = new ArrowController(this); // Creates a new controller and passes our this pointer to it as creator.56 62 57 } 63 58 … … 68 63 Arrow::~Arrow() 69 64 { 70 // Deletes the controller if the object was initialized and the pointer to the controller is not NULL. 71 // if( this->isInitialized() && this->myController_ != NULL ) 72 //delete this->myController_; 65 73 66 } 74 67 … … 83 76 84 77 XMLPortParam(Arrow, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode); 85 //TODO: Put your code in here:86 78 XMLPortParam(Arrow, "auxiliaryThrust", setAuxiliaryThrust, getAuxiliaryThrust, xmlelement, mode); 87 79 XMLPortParam(Arrow, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode); 88 // Make sure you add the variables auxiliaryThrust_ and rotationThrust_ to XMLPort. 89 // Variables can be added by the following command 90 // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunctionName, getFunctionName, xmlelement, mode); 91 // Also make sure that you also create the get- and set-functions in Arrow.h. As you can see, the get- and set-functions for the variable primaryThrust_ has already been specified there, so you can get your inspiration from there. 92 93 80 94 81 } 95 82
Note: See TracChangeset
for help on using the changeset viewer.