push
This commit is contained in:
parent
73f85a8d0d
commit
c34dd3a13c
@ -1,10 +1,12 @@
|
||||
use bevy::prelude::*;
|
||||
pub mod components;
|
||||
pub mod systems;
|
||||
pub mod plugins;
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
.add_plugins(DefaultPlugins)
|
||||
.add_plugins(plugins::inventory::InventoryPlugin)
|
||||
.insert_resource(Time::<Fixed>::from_hz(60.0))
|
||||
.add_systems(Startup, (setup, systems::player::spawn_player, systems::wolf::spawn_wolf))
|
||||
.add_systems(FixedUpdate, (systems::player::camera_lock, systems::player::player_movement))
|
||||
|
||||
27
src/plugins/inventory.rs
Normal file
27
src/plugins/inventory.rs
Normal file
@ -0,0 +1,27 @@
|
||||
use bevy::prelude::*;
|
||||
|
||||
use bevy::ui::BackgroundColor;
|
||||
|
||||
pub struct InventoryPlugin;
|
||||
|
||||
impl Plugin for InventoryPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_systems(Startup, (spawn_inventory,));
|
||||
}
|
||||
}
|
||||
|
||||
fn spawn_inventory(mut commands: Commands) {
|
||||
|
||||
commands
|
||||
.spawn((
|
||||
Node {
|
||||
width: Val::Percent(100.0),
|
||||
height: Val::Percent(10.0),
|
||||
// flex_direction: FlexDirection::Column,
|
||||
align_items: AlignItems::Center,
|
||||
justify_content: JustifyContent::Center,
|
||||
..Default::default()
|
||||
},
|
||||
BackgroundColor(Color::BLACK),
|
||||
));
|
||||
}
|
||||
1
src/plugins/mod.rs
Normal file
1
src/plugins/mod.rs
Normal file
@ -0,0 +1 @@
|
||||
pub mod inventory;
|
||||
Loading…
x
Reference in New Issue
Block a user