background
This commit is contained in:
parent
ef268aebef
commit
abecd3eeee
1 changed files with 12 additions and 0 deletions
12
src/main.rs
12
src/main.rs
|
|
@ -5,5 +5,17 @@ mod turn_system;
|
||||||
fn main() {
|
fn main() {
|
||||||
App::new()
|
App::new()
|
||||||
.add_plugins((DefaultPlugins, turn_system::TurnSystemPlugin))
|
.add_plugins((DefaultPlugins, turn_system::TurnSystemPlugin))
|
||||||
|
.add_systems(Startup, setup)
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn setup(asset_server: Res<AssetServer>, mut commands: Commands) {
|
||||||
|
let background = asset_server.load("sprites/field.png");
|
||||||
|
|
||||||
|
commands.spawn(Camera2d);
|
||||||
|
|
||||||
|
commands.spawn((
|
||||||
|
Sprite::from_image(background),
|
||||||
|
Transform::from_xyz(0., 0., 0.),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue