feat(player): animacions stun_* durant l'aterratge
This commit is contained in:
1 parent
3a750822f6
commit
f3f5fa5e92
7 files changed
+26
-6
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -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]
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -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]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user