Changeset 12296 for code/branches
- Timestamp:
- Apr 11, 2019, 3:27:08 PM (6 years ago)
- Location:
- code/branches/MouseAPI_FS19/src/modules/MouseAPI
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/MouseAPI_FS19/src/modules/MouseAPI/CMakeLists.txt
r12253 r12296 2 2 mouseapi.cc 3 3 mouseapiexample.cc 4 mousegametype.cc 4 5 ) 5 6 -
code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapiexample.cc
r12287 r12296 1 1 #include "mouseapiexample.h" 2 2 #include "gametypes/Gametype.h" 3 #include "infos/PlayerInfo.h" 4 #include "worldentities/CameraPosition.h" 5 #include "worldentities/ControllableEntity.h" 3 6 4 7 namespace orxonox … … 10 13 { 11 14 RegisterObject(MouseAPIExample); 12 //this->getGametype()->getPlayers().begin()->first->getControllableEntity()...13 14 15 15 } 16 16 … … 24 24 void MouseAPIExample::testfunction(MouseButtonCode::ByEnum mouse) 25 25 { 26 float randomnumber = (rand()%100 + 1)/ 100.0;26 float randomnumber = (rand()%100 + 1)/20.0; 27 27 this->setScale(randomnumber); 28 28 orxout() << "Blah\n"; 29 //this->getGametype()->getPlayers().begin()->first->getControllableEntity()->mouseLook();//getCurrentCameraPosition()->setAllowMouseLook(false); 30 //this->getGametype()->getPlayers().begin()->first->stopControl(); 29 31 30 32 } … … 35 37 MouseAPI::getInstance().activate(); 36 38 MouseAPI::getInstance().addClickableObject(this->getWorldPosition(),10,std::list<MouseButtonCode::ByEnum>{MouseButtonCode::Left},[this](MouseButtonCode::ByEnum mouse){this->testfunction(mouse);}); 39 //this->getGametype()->getPlayers().begin()->first->getControllableEntity()->mouseLook(); 40 41 37 42 } 38 43 }
Note: See TracChangeset
for help on using the changeset viewer.