Resizing the window

This commit is contained in:
Timothy Warren 2020-12-24 14:07:46 -05:00
parent 01d54c88e7
commit e15e900425

View File

@ -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<Windows>, 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())