Animations are now being pulled correctly but I need to add a timing concept to animations instead of ticks.

This commit is contained in:
Zed A. Shaw 2025-10-10 00:25:37 -04:00
parent 517de91a5b
commit c33f370572
10 changed files with 43 additions and 22 deletions

View file

@ -1,5 +1,6 @@
#include "boss/fight.hpp"
#include "boss/system.hpp"
#include "animation.hpp"
namespace boss {
Fight::Fight(shared_ptr<World> world, Entity boss_id) :
@ -87,6 +88,9 @@ namespace boss {
boss::System::combat(attack_id);
state(State::PLAYER_TURN);
} break;
case TICK:
$ui.play_animations();
break;
default:
break;
// skip it
@ -104,10 +108,14 @@ namespace boss {
case ATTACK: {
$ui.status(L"BOSS TURN");
$ui.move_boss(run % 10 < 5 ? "boss1" : "boss3");
$ui.$boss_anim.play();
int attack_id = std::any_cast<int>(data);
boss::System::combat(attack_id);
state(State::BOSS_TURN);
} break;
case TICK:
$ui.play_animations();
break;
default:
// skip it
break;