Better working camera that is constrained in the bounds, but the animations don't follow the bounding.

This commit is contained in:
Zed A. Shaw 2026-01-01 12:59:39 -05:00
parent 6dc9d564c6
commit 51bb74e2d7
9 changed files with 93 additions and 33 deletions

View file

@ -107,6 +107,7 @@ namespace boss {
state(State::END);
} else {
$ui.status(L"PLAYER REQUESTS", L"COMMIT");
$ui.reset_camera();
$battle.ap_refresh();
$battle.clear_requests();
state(State::PLAYER_REQUESTS);

View file

@ -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);
}
}

View file

@ -39,5 +39,6 @@ namespace boss {
void update_stats();
void play_animations();
void damage(const std::string& actor, const std::string& target, int amount);
void reset_camera();
};
}