Platform Data Engine 0.0.1
A data-driven game engine for platformers
PlatformDataEngine::CameraController Class Reference

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...
 
GameObjectgetTarget () const
 
void update (const float &dt, const float &elapsedTime)
 
sf::Vector2f getUIOffset () const
 

Detailed Description

Handles moving the camera and targetting gameObjects

Constructor & Destructor Documentation

◆ CameraController()

CameraController::CameraController ( float  lerpTime = 0.0f,
std::shared_ptr< sf::View >  view = nullptr 
)

Constructor

Parameters
lerpTimehigher values result in faster camera reaction time
viewa pointer to the world's view

Member Function Documentation

◆ setTarget()

void CameraController::setTarget ( GameObject gameObject)

Sets the gameObject for which the camera controller should follow

Parameters
gameObjectthe game object to target

The documentation for this class was generated from the following files: