diff --git a/data/player/morcus.gif b/data/player/morcus.gif index d4caa57..97b32b8 100644 Binary files a/data/player/morcus.gif and b/data/player/morcus.gif differ diff --git a/data/player/morcus.yaml b/data/player/morcus.yaml index cab1f57..7f8b148 100644 --- a/data/player/morcus.yaml +++ b/data/player/morcus.yaml @@ -32,9 +32,12 @@ animations: stand_down: { frames: [0] } stand_up: { frames: [4] } stand: { frames: [8] } - jump_down: { frames: [0] } - jump_up: { frames: [4] } - jump: { frames: [8] } + jump_down: { frames: [12] } + jump_up: { frames: [13] } + jump: { frames: [14] } + stun_down: { frames: [16] } + stun_up: { frames: [17] } + stun: { frames: [18] } walk_down: frames: [0, 1, 2, 3] diff --git a/data/player/sam.gif b/data/player/sam.gif index 98eaa5d..db9f574 100644 Binary files a/data/player/sam.gif and b/data/player/sam.gif differ diff --git a/data/player/sam.yaml b/data/player/sam.yaml index bd0f1a5..f27a872 100644 --- a/data/player/sam.yaml +++ b/data/player/sam.yaml @@ -32,9 +32,12 @@ animations: stand_down: { frames: [1] } stand_up: { frames: [5] } stand: { frames: [9] } - jump_down: { frames: [1] } - jump_up: { frames: [5] } - jump: { frames: [9] } + jump_down: { frames: [12] } + jump_up: { frames: [13] } + jump: { frames: [14] } + stun_down: { frames: [16] } + stun_up: { frames: [17] } + stun: { frames: [18] } walk_down: frames: [0, 1, 2, 3] diff --git a/data/sounds/jump.wav b/data/sounds/jump.wav new file mode 100644 index 0000000..920e27f Binary files /dev/null and b/data/sounds/jump.wav differ diff --git a/data/sounds/land.wav b/data/sounds/land.wav new file mode 100644 index 0000000..41867f6 Binary files /dev/null and b/data/sounds/land.wav differ diff --git a/source/game/entities/player.cpp b/source/game/entities/player.cpp index 1e1136d..384f037 100644 --- a/source/game/entities/player.cpp +++ b/source/game/entities/player.cpp @@ -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";