CmDebugCamera.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include "CmPrerequisites.h"
  3. #include "CmComponent.h"
  4. #include "CmInputHandler.h"
  5. namespace CamelotEngine
  6. {
  7. class DebugCamera : public Component
  8. {
  9. private:
  10. float mCurrentSpeed;
  11. bool mGoingForward;
  12. bool mGoingBack;
  13. bool mGoingLeft;
  14. bool mGoingRight;
  15. bool mFastMove;
  16. bool mCameraRotating;
  17. CameraPtr mCamera;
  18. void keyDown(CamelotEngine::KeyCode keyCode);
  19. void keyUp(CamelotEngine::KeyCode keyCode);
  20. void mouseDown(const CamelotEngine::MouseEvent& event, CamelotEngine::MouseButton buttonID);
  21. void mouseUp(const CamelotEngine::MouseEvent& event, CamelotEngine::MouseButton buttonID);
  22. static const float START_SPEED;
  23. static const float TOP_SPEED;
  24. static const float ACCELERATION;
  25. static const float FAST_MODE_MULTIPLIER;
  26. static const float ROTATION_SPEED; // Degrees/second
  27. /************************************************************************/
  28. /* COMPONENT OVERRIDES */
  29. /************************************************************************/
  30. private:
  31. friend class GameObject;
  32. /** Standard constructor.
  33. */
  34. DebugCamera(GameObjectPtr parent);
  35. public:
  36. virtual void update();
  37. };
  38. }