From bed39b9a5f0d3dfa2586ea386ef85453ada20b91 Mon Sep 17 00:00:00 2001 From: hheik <4469778+hheik@users.noreply.github.com> Date: Sun, 18 Dec 2022 17:17:09 +0200 Subject: [PATCH] feat: fixed window starting size --- src/game.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/game.rs b/src/game.rs index 0afb9b6..f747b91 100644 --- a/src/game.rs +++ b/src/game.rs @@ -27,9 +27,16 @@ pub fn init() { .add_plugin(Terrain2DPlugin) .add_plugin(PlayerPlugin) .add_startup_system(setup_terrain) + .add_startup_system(setup_window) .run(); } +fn setup_window(mut windows: ResMut) { + if let Some(window) = windows.get_primary_mut() { + window.set_resolution(1280.0 / 2.0, 720.0 / 2.0); + } +} + fn setup_terrain(mut commands: Commands, mut terrain: ResMut) { let terrain_gen = TerrainGen2D::new(432678); for y in 0..(WORLD_WIDTH / Chunk2D::SIZE_Y as i32) {