From 3ab0a82181bbdde5a337297ca7c7abf85abd324f Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 16 Mar 2024 23:05:07 +0100 Subject: [PATCH] Revert "use only required plugins" This reverts commit 5384ea2ec96a4f18f4cf67adb10efbb30b466c3b. --- src/main.rs | 46 +++++++++++----------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/src/main.rs b/src/main.rs index d6d98aa..3d6a9b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,49 +4,25 @@ mod camera; mod world; mod settings; -use bevy::a11y::AccessibilityPlugin; -use bevy::audio::AudioPlugin; -use bevy::input::InputPlugin; -use bevy::log::LogPlugin; +use bevy::window::{Window, WindowMode, PrimaryWindow, CursorGrabMode }; use bevy::prelude::*; -use bevy::render::RenderPlugin; -use bevy::window::{Window, WindowMode, PrimaryWindow, CursorGrabMode}; -use bevy::scene::ScenePlugin; -use bevy::core_pipeline::CorePipelinePlugin; -use bevy::pbr::PbrPlugin; -use bevy::winit::WinitPlugin; fn main() { App::new() .add_systems(Startup, ( - setup, - settings::setup, - audio::setup, - player::setup, - world::setup, + setup, + settings::setup, + audio::setup, + player::setup, + world::setup, )) .add_systems(Update, ( - handle_input, - player::handle_input, - audio::toggle_bgm, - world::asset_loaded.after(world::load_cubemap_asset), - )) - .add_plugins(( - LogPlugin::default(), - MinimalPlugins, - TransformPlugin, - InputPlugin, - WindowPlugin::default(), - AccessibilityPlugin, - AssetPlugin::default(), - ScenePlugin::default(), - WinitPlugin::default(), - RenderPlugin::default(), - ImagePlugin::default_nearest(), - CorePipelinePlugin::default(), - PbrPlugin::default(), - AudioPlugin::default(), + handle_input, + player::handle_input, + audio::toggle_bgm, + world::asset_loaded.after(world::load_cubemap_asset), )) + .add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest())) .add_plugins(camera::CameraControllerPlugin) .run(); }