From e15e900425bff31a54fe6ca12d05ab8d574d4d02 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Thu, 24 Dec 2020 14:07:46 -0500 Subject: [PATCH] Resizing the window --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.rs b/src/main.rs index 2ffb03d..ca1b869 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ use bevy::prelude::*; +use bevy::render::pass::ClearColor; const ARENA_WIDTH: u32 = 10; const ARENA_HEIGHT: u32 = 10; @@ -94,6 +95,13 @@ fn position_translation(windows: Res, mut q: Query<(&Position, &mut Tra fn main() { App::build() + .add_resource(ClearColor(Color::rgb(0.04, 0.04, 0.04))) + .add_resource(WindowDescriptor { + title: "Snake!".to_string(), + width: 500.0, + height: 500.0, + ..Default::default() + }) .add_startup_system(setup.system()) .add_startup_stage("game_setup", SystemStage::single(spawn_snake.system())) .add_system(snake_movement.system())