AnimatedScene now defines how a scene with animated sprites and actors is structured and played.

This commit is contained in:
Zed A. Shaw 2025-10-22 00:11:36 -04:00
parent e1da089600
commit 25f7096489
10 changed files with 43 additions and 48 deletions

View file

@ -84,7 +84,7 @@ namespace boss {
break;
case ATTACK: {
$ui.status(L"PLAYER TURN");
$ui.move_player(run % 10 < 5 ? "player1" : "player2");
$ui.move_actor($ui.$player_sprite, "player", run % 10 < 5 ? "player1" : "player2");
int attack_id = std::any_cast<int>(data);
boss::System::combat(attack_id);
state(State::PLAYER_TURN);
@ -105,7 +105,7 @@ namespace boss {
break;
case ATTACK: {
$ui.status(L"BOSS TURN");
$ui.move_boss(run % 10 < 5 ? "boss5" : "boss6");
$ui.$boss_pos = $ui.move_actor($ui.$boss_sprite, "boss", run % 10 < 5 ? "boss5" : "boss6");
$ui.$boss_anim.play();
int attack_id = std::any_cast<int>(data);
boss::System::combat(attack_id);