aboutsummaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/StartGameScript.cpp2
-rw-r--r--game/background/HallwaySubScene.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/game/StartGameScript.cpp b/game/StartGameScript.cpp
index 1196d47..50ba86c 100644
--- a/game/StartGameScript.cpp
+++ b/game/StartGameScript.cpp
@@ -40,7 +40,7 @@ void StartGameScript::fixed_update(crepe::duration_t dt) {
if (player_transform.position.x > 275 && !this->took_jetpack) {
Animator & jetpack_stand_anim
= this->get_components_by_name<Animator>("start_begin").back();
- // jetpack_stand_anim.next_anim();
+ jetpack_stand_anim.next_anim();
Sprite & jetpack_sprite = this->get_components_by_name<Sprite>("player").back();
jetpack_sprite.active = true;
diff --git a/game/background/HallwaySubScene.cpp b/game/background/HallwaySubScene.cpp
index 9a6654a..4d96c94 100644
--- a/game/background/HallwaySubScene.cpp
+++ b/game/background/HallwaySubScene.cpp
@@ -153,6 +153,11 @@ void HallwaySubScene::add_sector_number(
Animator & sector_num_anim = obj.add_component<Animator>(
sector_num_sprite, ivec2(256, 128), uvec2(4, 4), Animator::Data {}
);
- sector_num_anim.data.frame++;
+ int column = (sector_num - 1) / 4;
+ int row = (sector_num - 1) % 4;
+ sector_num_anim.set_anim(column);
+ for (int i = 0; i < row; i++) {
+ sector_num_anim.next_anim();
+ }
sector_num_anim.pause();
}