- Timestamp:
- Oct 21, 2009, 5:17:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/steering/src/orxonox/controllers/NewHumanController.cc
r5979 r5981 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau23 * Michael Wirth 24 24 * Co-authors: 25 25 * ... … … 28 28 29 29 #include "NewHumanController.h" 30 31 #include "core/input/InputManager.h" 32 #include "core/input/InputState.h" 30 33 31 34 #include "core/CoreIncludes.h" … … 72 75 73 76 NewHumanController::localController_s = this; 77 78 gameInputState_ = InputManager::getInstance().createInputState("humansteering", true, true); 79 gameInputState_->setMouseHandler(this); 80 gameInputState_->setMouseMode(MouseMode::Exclusive); 74 81 } 75 82 … … 77 84 { 78 85 NewHumanController::localController_s = 0; 86 87 if( this->isInitialized() ) 88 { 89 gameInputState_->setHandler(0); 90 InputManager::getInstance().destroyState("humansteering"); 91 } 79 92 } 80 93 … … 95 108 } 96 109 110 void NewHumanController::startControl() { 111 //gameInputState_->setHandler(KeyBinderManager::getInstance().getDefaultAsHandler()); 112 //KeyBinderManager::getInstance().setToDefault(); 113 114 InputManager::getInstance().enterState("humansteering"); 115 std::cout << "started control" << endl; 116 } 117 118 void NewHumanController::stopControl() { 119 InputManager::getInstance().leaveState("humansteering"); 120 std::cout << "stopped control" << endl; 121 } 122 123 void NewHumanController::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) 124 { 125 std::cout << "X: " << static_cast<float>(abs.x) << " Y: " << static_cast<float>(abs.y) << endl; 126 } 127 97 128 }
Note: See TracChangeset
for help on using the changeset viewer.