Changeset 6108 for code/branches/presentation2/src/orxonox/controllers
- Timestamp:
- Nov 20, 2009, 8:15:25 PM (15 years ago)
- Location:
- code/branches/presentation2
- Files:
-
- 6 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2
- Property svn:mergeinfo changed
/code/branches/steering (added) merged: 5979,5981,5984,5993,6001,6033,6045,6052,6055,6058,6091
- Property svn:mergeinfo changed
-
code/branches/presentation2/src/orxonox/controllers/CMakeLists.txt
r5781 r6108 2 2 Controller.cc 3 3 HumanController.cc 4 NewHumanController.cc 4 5 ArtificialController.cc 5 6 AIController.cc -
code/branches/presentation2/src/orxonox/controllers/Controller.cc
r5781 r6108 29 29 #include "Controller.h" 30 30 #include "core/CoreIncludes.h" 31 #include "worldentities/ControllableEntity.h" 31 32 32 33 namespace orxonox -
code/branches/presentation2/src/orxonox/controllers/Controller.h
r6107 r6108 54 54 virtual void changedControllableEntity() {} 55 55 56 virtual bool canFindTarget() 57 { return false; } 58 virtual Vector3 getTarget() 59 { return Vector3::ZERO; } 60 56 61 protected: 57 62 // don't use this directly, use getPlayer()->startControl(entity) (unless you know exactly what you do) … … 65 70 } 66 71 72 protected: 67 73 PlayerInfo* player_; 68 74 ControllableEntity* controllableEntity_; -
code/branches/presentation2/src/orxonox/controllers/HumanController.cc
r5929 r6108 113 113 } 114 114 115 void HumanController:: rotateYaw(const Vector2& value)115 void HumanController::yaw(const Vector2& value) 116 116 { 117 117 //Hack to enable mouselook in map … … 125 125 } 126 126 127 void HumanController:: rotatePitch(const Vector2& value)127 void HumanController::pitch(const Vector2& value) 128 128 { 129 129 //Hack to enable mouselook in map … … 143 143 } 144 144 145 void HumanController:: fire(unsigned int firemode)145 void HumanController::doFire(unsigned int firemode) 146 146 { 147 147 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) -
code/branches/presentation2/src/orxonox/controllers/HumanController.h
r5929 r6108 49 49 static void moveUpDown(const Vector2& value); 50 50 51 static void rotateYaw(const Vector2& value) ;52 static void rotatePitch(const Vector2& value) ;51 static void rotateYaw(const Vector2& value){ HumanController::localController_s->yaw(value); } 52 static void rotatePitch(const Vector2& value){ HumanController::localController_s->pitch(value); } 53 53 static void rotateRoll(const Vector2& value); 54 55 virtual void yaw(const Vector2& value); 56 virtual void pitch(const Vector2& value); 54 57 55 static void fire(unsigned int firemode); 58 static void fire(unsigned int firemode) { HumanController::localController_s->doFire(firemode); } 59 virtual void doFire(unsigned int firemode); 56 60 static void reload(); 57 61 … … 76 80 friend class Map; 77 81 78 pr ivate:82 protected: 79 83 static HumanController* localController_s; 80 84 };
Note: See TracChangeset
for help on using the changeset viewer.