initial
This commit is contained in:
commit
b745642054
|
@ -0,0 +1,3 @@
|
|||
/target
|
||||
|
||||
.cargo
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,10 @@
|
|||
[package]
|
||||
name = "lily"
|
||||
version = "0.1.0"
|
||||
authors = ["marisa <mokou@fastmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bevy = "0.5.0"
|
|
@ -0,0 +1,18 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
const VERSION: &'static str = "0.0-a1";
|
||||
|
||||
mod setup;
|
||||
|
||||
fn main() {
|
||||
App::build()
|
||||
.insert_resource(WindowDescriptor {
|
||||
width: 500.,
|
||||
height: 300.,
|
||||
title: format!("Lily {}", VERSION),
|
||||
vsync: false,
|
||||
..Default::default()
|
||||
})
|
||||
.add_startup_system(setup::system.system())
|
||||
.run();
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
pub fn system(mut commands: Commands, asset_server: Res<AssetServer>, mut materials: ResMut<Assets<ColorMaterial>) {
|
||||
// ui camera
|
||||
commands.spawn_bundle(UiCameraBundle::default());
|
||||
// root node
|
||||
commands
|
||||
.spawn_bundle(NodeBundle {
|
||||
style: Style {
|
||||
size: Size::new(Val::Percent(100.0), Val::Percent(100)),
|
||||
justify_content: JustifyContent::SpaceBetween,
|
||||
..Default::default()
|
||||
},
|
||||
material: materials.add(Color::NONE.into()),
|
||||
..Default::default()
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue