When there's actions in the arena the camera moves.
This commit is contained in:
parent
63a17d7efa
commit
d244106981
4 changed files with 52 additions and 14 deletions
|
|
@ -56,6 +56,14 @@ namespace cinematic {
|
|||
}
|
||||
}
|
||||
|
||||
void Camera::reset(sf::RenderTexture& target, float width, float height) {
|
||||
size = {width, height};
|
||||
aimed_at = {width/2, height/2};
|
||||
going_to = {width/2, height/2};
|
||||
view = {aimed_at, size};
|
||||
target.setView(target.getDefaultView());
|
||||
}
|
||||
|
||||
void Camera::render(sf::RenderTexture& target) {
|
||||
if(anim.playing) {
|
||||
anim.apply(view, going_to, size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue