Resizing the window
This commit is contained in:
parent
01d54c88e7
commit
e15e900425
@ -1,4 +1,5 @@
|
|||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
|
use bevy::render::pass::ClearColor;
|
||||||
|
|
||||||
const ARENA_WIDTH: u32 = 10;
|
const ARENA_WIDTH: u32 = 10;
|
||||||
const ARENA_HEIGHT: 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() {
|
fn main() {
|
||||||
App::build()
|
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_system(setup.system())
|
||||||
.add_startup_stage("game_setup", SystemStage::single(spawn_snake.system()))
|
.add_startup_stage("game_setup", SystemStage::single(spawn_snake.system()))
|
||||||
.add_system(snake_movement.system())
|
.add_system(snake_movement.system())
|
||||||
|
Loading…
Reference in New Issue
Block a user