diff --git a/assets/worlds/mainworld.json b/assets/worlds/mainworld.json index add0aa3..17ce35c 100644 --- a/assets/worlds/mainworld.json +++ b/assets/worlds/mainworld.json @@ -1,7 +1,7 @@ { "end_position": { "x": 350.0, - "y": 2100.0 + "y": 2050.0 }, "player_spawn": { "x": 220.0, diff --git a/src/logic/ingame/mod.rs b/src/logic/ingame/mod.rs index 383bd25..770d3dc 100644 --- a/src/logic/ingame/mod.rs +++ b/src/logic/ingame/mod.rs @@ -179,11 +179,9 @@ impl Screen for InGameScreen { { let mut context_2d = draw_handle.begin_mode2D(game_core.master_camera); - // Clear frame context_2d.clear_background(Color::BLACK); - // Render the world self.render_world(&mut context_2d, game_core, dt); if game_core.show_simple_debug_info { @@ -210,16 +208,12 @@ impl Screen for InGameScreen { ); } - - // Render transponder - game_core.resources.transponder.draw(&mut context_2d, game_core.world.end_position + Vector2::new(0.0, -50.0), 0.0); - - - - - - - + // Render transponder + game_core.resources.transponder.draw( + &mut context_2d, + game_core.world.end_position, + 0.0, + ); // Render Player game_core @@ -261,9 +255,14 @@ impl Screen for InGameScreen { return Some(GameState::GameEnd); } - if game_core.world.end_position.distance_to(game_core.player.position) <= 70.0{ - return Some(GameState::WinGame); - } + if game_core + .world + .end_position + .distance_to(game_core.player.position) + <= 70.0 + { + return Some(GameState::WinGame); + } return None; }