Merge pull request #31 from Willy-JL/air-labyrinth-fixes

Air Labyrinth Fixes
This commit is contained in:
Derek Jamison 2024-03-14 13:58:25 +07:00 committed by GitHub
commit db6b5e4f1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,7 @@ App(
# fap_extbuild=( # fap_extbuild=(
# ExtFile( # ExtFile(
# path="${FAP_SRC_DIR}/assets", # path="${FAP_SRC_DIR}/assets",
# command="python3 ${FAP_SRC_DIR}/engine/scripts/sprite_builder.py ${FAP_SRC_DIR.abspath}/sprites ${TARGET.abspath}/sprites", # command="${PYTHON3} ${FAP_SRC_DIR}/engine/scripts/sprite_builder.py ${FAP_SRC_DIR.abspath}/sprites ${TARGET.abspath}/sprites",
# ), # ),
# ), # ),
) )

View File

@ -83,9 +83,9 @@ static void player_update(Entity* self, GameManager* manager, void* context) {
player->trajectory = vector_add( player->trajectory = vector_add(
player->trajectory, player->trajectory,
(Vector){ ((Vector){
player_x_from_pitch(-imu_pitch_get(game_context->imu)), player_x_from_pitch(-imu_pitch_get(game_context->imu)),
player_y_from_roll(-imu_roll_get(game_context->imu))}); player_y_from_roll(-imu_roll_get(game_context->imu))}));
} }
// Get game input // Get game input
@ -93,19 +93,19 @@ static void player_update(Entity* self, GameManager* manager, void* context) {
// Control player movement // Control player movement
if(input.held & GameKeyUp) { if(input.held & GameKeyUp) {
player->trajectory = vector_add(player->trajectory, (Vector){0, -0.8}); player->trajectory = vector_add(player->trajectory, ((Vector){0, -0.8}));
} }
if(input.held & GameKeyDown) { if(input.held & GameKeyDown) {
player->trajectory = vector_add(player->trajectory, (Vector){0, +0.8}); player->trajectory = vector_add(player->trajectory, ((Vector){0, +0.8}));
} }
if(input.held & GameKeyLeft) { if(input.held & GameKeyLeft) {
player->trajectory = vector_add(player->trajectory, (Vector){-0.8, 0}); player->trajectory = vector_add(player->trajectory, ((Vector){-0.8, 0}));
} }
if(input.held & GameKeyRight) { if(input.held & GameKeyRight) {
player->trajectory = vector_add(player->trajectory, (Vector){0.8, 0}); player->trajectory = vector_add(player->trajectory, ((Vector){0.8, 0}));
} }
// Get player position // Get player position