Changeset 9252 for code/trunk/src
- Timestamp:
- May 28, 2012, 12:00:53 AM (13 years ago)
- Location:
- code/trunk/src/orxonox/controllers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/controllers/ArtificialController.cc
r9016 r9252 24 24 * Co-authors: 25 25 * Dominik Solenicki 26 * 26 * 27 27 */ 28 28 29 29 #include "ArtificialController.h" 30 30 #include "core/CoreIncludes.h" 31 #include "core/XMLPort.h" 31 32 #include "core/command/ConsoleCommand.h" 32 33 #include "worldentities/pawns/Pawn.h" … … 46 47 ArtificialController::ArtificialController(BaseObject* creator) : FormationController(creator) 47 48 { 49 RegisterObject(ArtificialController); 50 48 51 this->bSetupWorked = false; 49 52 this->botlevel_ = 0.5f; … … 64 67 } 65 68 69 void ArtificialController::XMLPort(Element& xmlelement, XMLPort::Mode mode) 70 { 71 SUPER(ArtificialController, XMLPort, xmlelement, mode); 72 73 XMLPortParam(ArtificialController, "accuracy", setAccuracy, getAccuracy, xmlelement, mode).defaultValues(100.0f); 74 XMLPortObject(ArtificialController, WorldEntity, "waypoints", addWaypoint, getWaypoint, xmlelement, mode); 75 } 66 76 67 77 /** … … 276 286 this->updatePointsOfInterest("PickupSpawner", 20.0f); // take pickup en passant if there is a default waypoint 277 287 } 278 288 279 289 } -
code/trunk/src/orxonox/controllers/ArtificialController.h
r9016 r9252 42 42 virtual ~ArtificialController(); 43 43 44 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 45 44 46 void abandonTarget(Pawn* target); 45 47 … … 62 64 void manageWaypoints(); 63 65 64 66 65 67 66 68 protected: 67 69 68 70 void aimAtTarget(); 69 71 -
code/trunk/src/orxonox/controllers/WaypointController.cc
r8891 r9252 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/XMLPort.h"33 32 #include "worldentities/ControllableEntity.h" 34 33 … … 52 51 } 53 52 54 void WaypointController::XMLPort(Element& xmlelement, XMLPort::Mode mode)55 {56 SUPER(WaypointController, XMLPort, xmlelement, mode);57 58 XMLPortParam(ArtificialController, "accuracy", setAccuracy, getAccuracy, xmlelement, mode).defaultValues(100.0f);59 XMLPortObject(ArtificialController, WorldEntity, "waypoints", addWaypoint, getWaypoint, xmlelement, mode);60 }61 62 53 void WaypointController::tick(float dt) 63 54 { -
code/trunk/src/orxonox/controllers/WaypointController.h
r8891 r9252 44 44 virtual ~WaypointController(); 45 45 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);47 46 virtual void tick(float dt); 48 47
Note: See TracChangeset
for help on using the changeset viewer.