Tried to get camera to have a reset but couldn't figure out.
This commit is contained in:
parent
29409c54ce
commit
de7f9f3445
4 changed files with 37 additions and 34 deletions
12
camera.hpp
12
camera.hpp
|
|
@ -6,16 +6,18 @@ namespace cinematic {
|
|||
struct Camera {
|
||||
components::Animation anim;
|
||||
sf::View view;
|
||||
sf::Vector2f size;
|
||||
sf::Vector2f position;
|
||||
sf::Vector2f size{SCREEN_WIDTH, SCREEN_WIDTH};
|
||||
sf::Vector2f aimed_at{0,0};
|
||||
sf::Vector2f going_to{0,0};
|
||||
|
||||
Camera();
|
||||
|
||||
void resize(sf::Vector2f size);
|
||||
void move(sf::RenderTexture& target, sf::Vector2f pos);
|
||||
void resize(float width, float height);
|
||||
void position(float x, float y);
|
||||
void move(float x, float y);
|
||||
bool playing();
|
||||
void render(sf::RenderTexture& target);
|
||||
void play();
|
||||
void focus(float x, float y);
|
||||
void style(const std::string &name);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue