Now have a simple camera system that I can configure in json for different motion effects.
This commit is contained in:
parent
8345097e10
commit
5b57fb2033
11 changed files with 173 additions and 128 deletions
20
camera.hpp
20
camera.hpp
|
|
@ -1 +1,21 @@
|
|||
#pragma once
|
||||
#include "components.hpp"
|
||||
#include <SFML/Graphics/RenderTexture.hpp>
|
||||
|
||||
namespace cinematic {
|
||||
struct Camera {
|
||||
components::Animation anim;
|
||||
sf::View view;
|
||||
sf::Vector2f size;
|
||||
|
||||
Camera();
|
||||
|
||||
void resize(sf::Vector2f size);
|
||||
void move(sf::RenderTexture& target, sf::Vector2f pos);
|
||||
bool playing();
|
||||
void play();
|
||||
void style(const std::string &name);
|
||||
};
|
||||
|
||||
void init();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue