SHARE
TWEET

Untitled

a guest Jun 18th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ECS::Entity * UserCameraManager = EntityWorld->create();
  2. UserCameraManager->assign<Input>();
  3. UserCameraManager->assign<Camera>(getMainUserCamera());
  4.      
  5. CameraSystem::update(Input input, Camera camera)
  6.   if ( input.isKeyPress(Input::A) || input.getMouseXScreenRatio() < 0.01 )
  7.       camera.getCamera()->Translate(glm::vec2(-5.0f, 0.0f) * static_cast<float>(DeltaTime));
  8.      
  9. ECS::Entity * UserCameraManager = EntityWorld->create();
  10. UserCameraManager->assign<Input>(getGlobalInputManager());
  11. UserCameraManager->assign<Camera>(getMainUserCamera());
  12.  
  13. CameraSystem::update(Input input, Camera camera)
  14.   if ( input.getInputManager()->isKeyPress(Input::A) || input.getInputManager()->getMouseXScreenRatio() < 0.01 )
  15.       camera.getCamera()->Translate(glm::vec2(-5.0f, 0.0f) * static_cast<float>(DeltaTime));
  16.      
  17. SystemCameraControl::update(Input input, CameraController cameraController)
  18.   cameraController.resetValues()
  19.   if ( input.getInputManager()->isKeyPress(Input::A) || input.getInputManager()->getMouseXScreenRatio() < 0.01
  20.     cameraController.moveLeft(5)
  21.      
  22. CameraSystem::update(CameraController cameraController, Camera camera)
  23.   if ( cameraController.shouldMove() )
  24.     camera.getCamera()->Translate(cameraController.getDisplacementPerSec() * static_cast<float>(DeltaTime));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top