You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
500 B
26 lines
500 B
#include "camera.h" |
|
|
|
Camera::Camera() |
|
{ |
|
|
|
} |
|
|
|
Camera::~Camera() |
|
{ |
|
|
|
} |
|
|
|
void Camera::SetNewView(sf::RenderWindow *window) { |
|
this->view = sf::View(sf::FloatRect(0, 0, 1280, 720)); |
|
window->setView(view); |
|
} |
|
|
|
void Camera::MoveCamera(sf::RenderWindow *window, sf::Vector2f move) { |
|
this->view.move(move.x, move.y); |
|
window->setView(view); |
|
} |
|
|
|
void Camera::SetCenter(sf::RenderWindow *window, sf::Vector2f position) { |
|
this->view.setCenter(position.x, position.y); |
|
window->setView(view); |
|
}
|
|
|