Arena is working with the new animate2 but boss/fight.cpp needs a complete overhaul.
This commit is contained in:
parent
ba91929bfd
commit
f8a8033890
2 changed files with 1 additions and 5 deletions
|
|
@ -150,11 +150,9 @@ namespace boss {
|
|||
$ui.move_actor("player", player_move);
|
||||
if(result.player_did > 0) {
|
||||
$ui.animate_actor("player", "attack");
|
||||
$ui.animate_actor("boss", "hurt");
|
||||
} else {
|
||||
// NO need a no animation event
|
||||
$ui.animate_actor("player", "idle");
|
||||
$ui.animate_actor("boss", "idle");
|
||||
}
|
||||
$ui.damage("player", "boss", result.player_did);
|
||||
} break;
|
||||
|
|
@ -164,11 +162,9 @@ namespace boss {
|
|||
$ui.move_actor("boss", boss_move);
|
||||
if(result.enemy_did > 0) {
|
||||
$ui.animate_actor("boss", "attack");
|
||||
$ui.animate_actor("player", "hurt");
|
||||
} else {
|
||||
// NO need a no animation event
|
||||
$ui.animate_actor("boss", "idle");
|
||||
$ui.animate_actor("player", "idle");
|
||||
}
|
||||
$ui.damage("boss", "player", result.enemy_did);
|
||||
} break;
|
||||
|
|
|
|||
|
|
@ -122,10 +122,10 @@ namespace scene {
|
|||
|
||||
void Engine::animate_actor(const std::string& actor, const std::string& form) {
|
||||
auto& config = actor_config(actor);
|
||||
config.anim.set_form(form);
|
||||
|
||||
if(!config.anim.playing) {
|
||||
config.anim.play();
|
||||
config.anim.set_form(form);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue