feat(player): animacions stun_* durant l'aterratge

This commit is contained in:
JailDesigner committed 2026-04-25 13:48:03 +02:00
1 parent 3a750822f6
commit f3f5fa5e92
7 files changed
+26 -6

No files matched your search

+14
View File
@@ -757,6 +757,20 @@ auto Player::animationName(bool moving) const -> const char* {
}
return "jump";
}
// En LANDING_STUN, `stun_*` (per direcció): mostrem el frame
// d'aterratge fins que s'esgota el timer. La direcció ve fixada del
// moment del despegue (no es canvia mentre estem en l'aire).
if (state_ == State::LANDING_STUN) {
switch (facing_) {
case Facing::UP:
return "stun_up";
case Facing::DOWN:
return "stun_down";
case Facing::SIDE:
break;
}
return "stun";
}
switch (facing_) {
case Facing::UP:
return moving ? "walk_up" : "stand_up";