This commit is contained in:
Franklin 2023-11-16 16:05:32 -04:00
parent 52e5fe7692
commit e7aed2f974
4 changed files with 23 additions and 3 deletions

View File

@ -0,0 +1,7 @@
use bevy::prelude::*;
#[derive(Component, PartialEq, Eq, PartialOrd, Ord, Clone)]
pub struct MagazineMarker {
pub capacity: u32,
pub fired: u32,
}

View File

@ -28,10 +28,10 @@ fn main() {
fn setup_plugins(application: &mut App) { fn setup_plugins(application: &mut App) {
application application
.add_plugins(DefaultPlugins) .add_plugins(DefaultPlugins.set(AssetPlugin::default()))
.add_plugins(ComponentsFromGltfPlugin)
//.add_plugins(DefaultInspectorConfigPlugin) //.add_plugins(DefaultInspectorConfigPlugin)
.add_plugins(RapierPhysicsPlugin::<NoUserData>::default()) .add_plugins(RapierPhysicsPlugin::<NoUserData>::default())
.add_plugins(ComponentsFromGltfPlugin)
//.add_plugins(bevy_egui::EguiPlugin) //.add_plugins(bevy_egui::EguiPlugin)
//.add_plugins(WorldInspectorPlugin::new()) //.add_plugins(WorldInspectorPlugin::new())
.add_plugins(proxy::plugin::ProxyComponentsPlugin) .add_plugins(proxy::plugin::ProxyComponentsPlugin)

View File

@ -39,7 +39,7 @@ pub fn load_scene(application: &mut App) {
application.add_plugins(SpawnerPlugin); application.add_plugins(SpawnerPlugin);
application.add_plugins(InventoryPlugin); application.add_plugins(InventoryPlugin);
// Startup // Startup
application.add_systems(PreStartup, load_all_assets); application.add_systems(Startup, load_all_assets);
application.add_systems(Startup, spawn_ground); application.add_systems(Startup, spawn_ground);
application.add_systems(Startup, spawn_obstacles); application.add_systems(Startup, spawn_obstacles);
application.add_systems(Startup, setup_lighting); application.add_systems(Startup, setup_lighting);

View File

@ -0,0 +1,13 @@
// This is where you'll create an update system to do things with keybinds in the Inventory System
use bevy::prelude::*;
#[allow(unused)]
pub fn inventory_keybinds_system(
mut commands: Commands,
keyboard_input: Res<Input<KeyCode>>,
) {
if keyboard_input.just_pressed(KeyCode::G) {
// TODO: Drop item hovered
}
}