Changeset 1398 for code/branches/network/src/orxonox/objects
- Timestamp:
- May 23, 2008, 7:12:05 PM (16 years ago)
- Location:
- code/branches/network/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/objects/SpaceShip.cc
r1391 r1398 159 159 void SpaceShip::init() 160 160 { 161 if ((server_ || ( network::Client::getSingleton() && network::Client::getSingleton()->getShipID()==objectID ) ))162 {163 if (!setMouseEventCallback_)164 {165 InputManager::addMouseHandler(this, "SpaceShip");166 InputManager::enableMouseHandler("SpaceShip");167 setMouseEventCallback_ = true;168 }169 }170 171 161 // START CREATING THRUSTER 172 162 this->tt_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow"); … … 314 304 } 315 305 316 void SpaceShip::mouseButtonPressed(MouseButton::Enum id)317 {318 if (id == MouseButton::Right)319 this->bRMousePressed_ = true;320 }321 322 void SpaceShip::mouseButtonReleased(MouseButton::Enum id)323 {324 if (id == MouseButton::Right)325 {326 this->bRMousePressed_ = false;327 this->camNode_->resetOrientation();328 }329 }330 331 306 std::string SpaceShip::whereAmI() { 332 307 return getConvertedValue<float, std::string>(SpaceShip::getLocalShip()->getPosition().x) -
code/branches/network/src/orxonox/objects/SpaceShip.h
r1391 r1398 41 41 namespace orxonox 42 42 { 43 class _OrxonoxExport SpaceShip : public Model , public MouseHandler43 class _OrxonoxExport SpaceShip : public Model 44 44 { 45 45 public: … … 78 78 static void moveLateral(float value); 79 79 static void fire(); 80 81 void mouseButtonPressed (MouseButton::Enum id);82 void mouseButtonReleased(MouseButton::Enum id);83 void mouseButtonHeld (MouseButton::Enum id) { }84 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) { }85 void mouseScrolled (int abs, int rel) { }86 80 87 81 float getMaxSpeed();
Note: See TracChangeset
for help on using the changeset viewer.