Better working camera that is constrained in the bounds, but the animations don't follow the bounding.
This commit is contained in:
parent
6dc9d564c6
commit
51bb74e2d7
9 changed files with 93 additions and 33 deletions
|
|
@ -106,12 +106,18 @@ namespace boss {
|
|||
$arena.play_animations();
|
||||
}
|
||||
|
||||
void UI::damage(const std::string& actor, const std::string& target, int amount) {
|
||||
void UI::damage(const string& actor, const std::string& target, int amount) {
|
||||
if(amount > 0) {
|
||||
$arena.attach_text(target, fmt::format("{}", amount));
|
||||
$arena.apply_effect(actor, "flame");
|
||||
fmt::println("CAMERA zooming by 0.7 to {}", target);
|
||||
$arena.zoom(target, 0.8f);
|
||||
} else {
|
||||
$arena.attach_text(actor, "MISSED");
|
||||
}
|
||||
}
|
||||
|
||||
void UI::reset_camera() {
|
||||
$arena.reset($view_texture);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue