Merge pull request #31 from Willy-JL/air-labyrinth-fixes
Air Labyrinth Fixes
This commit is contained in:
commit
db6b5e4f1a
@ -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",
|
||||||
# ),
|
# ),
|
||||||
# ),
|
# ),
|
||||||
)
|
)
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user