Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5787 for code/branches


Ignore:
Timestamp:
Sep 25, 2009, 8:43:46 PM (15 years ago)
Author:
scheusso
Message:

not using the XMLPortParamVariable hack anymore in the Drone class

Location:
code/branches/tutorial/src/orxonox/worldentities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutorial/src/orxonox/worldentities/Drone.cc

    r5786 r5787  
    7171        SUPER(Drone, XMLPort, xmlelement, mode);
    7272
    73         XMLPortParamVariable(Drone, "primaryThrust",  primaryThrust_,  xmlelement, mode);
    74         XMLPortParamVariable(Drone, "auxilaryThrust", auxilaryThrust_, xmlelement, mode);
    75         XMLPortParamVariable(Drone, "rotationThrust", rotationThrust_, xmlelement, mode);
     73        XMLPortParam(Drone, "primaryThrust",  setPrimaryThrust, getPrimaryThrust,  xmlelement, mode);
     74        XMLPortParam(Drone, "auxilaryThrust", setAuxilaryThrust, getAuxilaryThrust, xmlelement, mode);
     75        XMLPortParam(Drone, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
    7676    }
    7777
  • code/branches/tutorial/src/orxonox/worldentities/Drone.h

    r5766 r5787  
    6969            { this->rotateRoll(Vector2(value, 0)); }
    7070           
     71            void setPrimaryThrust( float thrust ){ this->primaryThrust_=thrust; }
     72            void setAuxilaryThrust( float thrust ){ this->auxilaryThrust_=thrust; }
     73            void setRotationThrust( float thrust ){ this->rotationThrust_=thrust; }
     74           
     75            float getPrimaryThrust(){ return this->primaryThrust_; }
     76            float getAuxilaryThrust(){ return this->auxilaryThrust_; }
     77            float getRotationThrust(){ return this->rotationThrust_; }
     78           
    7179        private:
    7280            DroneController *myController_;
Note: See TracChangeset for help on using the changeset viewer.