|
Platform Data Engine 0.0.1
A data-driven game engine for platformers
|
Handles moving the camera and targetting gameObjects More...
#include <CameraController.h>
Public Member Functions | |
| CameraController (float lerpTime=0.0f, std::shared_ptr< sf::View > view=nullptr) | |
| Constructor More... | |
| void | setTarget (GameObject *gameObject) |
| Sets the gameObject for which the camera controller should follow More... | |
| GameObject * | getTarget () const |
| void | update (const float &dt, const float &elapsedTime) |
| sf::Vector2f | getUIOffset () const |
Handles moving the camera and targetting gameObjects
| CameraController::CameraController | ( | float | lerpTime = 0.0f, |
| std::shared_ptr< sf::View > | view = nullptr |
||
| ) |
Constructor
| lerpTime | higher values result in faster camera reaction time |
| view | a pointer to the world's view |
| void CameraController::setTarget | ( | GameObject * | gameObject | ) |
Sets the gameObject for which the camera controller should follow
| gameObject | the game object to target |