Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12296 for code


Ignore:
Timestamp:
Apr 11, 2019, 3:27:08 PM (6 years ago)
Author:
tkuonen
Message:

added MouseGametype

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  
    22  mouseapi.cc
    33  mouseapiexample.cc
     4  mousegametype.cc
    45)
    56
  • code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapiexample.cc

    r12287 r12296  
    11#include "mouseapiexample.h"
    22#include "gametypes/Gametype.h"
     3#include "infos/PlayerInfo.h"
     4#include "worldentities/CameraPosition.h"
     5#include "worldentities/ControllableEntity.h"
    36
    47namespace orxonox
     
    1013{
    1114    RegisterObject(MouseAPIExample);
    12     //this->getGametype()->getPlayers().begin()->first->getControllableEntity()...
    13 
    14 
    1515}
    1616
     
    2424void MouseAPIExample::testfunction(MouseButtonCode::ByEnum mouse)
    2525{
    26     float randomnumber = (rand()%100 + 1)/100.0;
     26    float randomnumber = (rand()%100 + 1)/20.0;
    2727    this->setScale(randomnumber);
    2828    orxout() << "Blah\n";
     29    //this->getGametype()->getPlayers().begin()->first->getControllableEntity()->mouseLook();//getCurrentCameraPosition()->setAllowMouseLook(false);
     30    //this->getGametype()->getPlayers().begin()->first->stopControl();
    2931
    3032}
     
    3537    MouseAPI::getInstance().activate();
    3638    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
    3742}
    3843}
Note: See TracChangeset for help on using the changeset viewer.