Files
another-asteroids/src/main.rs
Robert Garrett 941c2f6bea World size configuration
The WorldSize is a Resource so that I can use it in the entity wrapping
system. The size is pulled from a public constant in the config.rs file,
and the window is made that same size.
2024-11-28 09:50:13 -06:00

17 lines
446 B
Rust

use bevy::{prelude::*, window::WindowResolution};
use asteroids::{config::WINDOW_SIZE, AsteroidPlugin};
fn main() {
App::new()
.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
resolution: WindowResolution::new(WINDOW_SIZE.x, WINDOW_SIZE.y),
..default()
}),
..default()
}))
.add_plugins(AsteroidPlugin)
.run();
}