build: disable useless features in example

This commit is contained in:
2024-02-16 00:30:05 +01:00
parent c6cb6fb46e
commit 14a9c10d9a
3 changed files with 44 additions and 767 deletions
File diff suppressed because it is too large Load Diff
+8 -4
View File
@@ -4,13 +4,17 @@ version = "0.1.0"
edition = "2021"
[features]
default_font = []
x11 = ["bevy/x11"]
wayland = ["bevy/wayland"]
x11 = ["bevy/x11", "bevy/bevy_winit"]
wayland = ["bevy/wayland", "bevy/bevy_winit"]
windows = ["bevy/bevy_winit"]
[dependencies]
bevy = "0.12.1"
bevy = { version = "0.12.1", default-features = false, features = [
"bevy_asset",
"bevy_text",
"bevy_ui",
"default_font",
]}
bevy_controls = { path = "./../../" }
strum = "0.25.0"
strum_macros = "0.25.3"
@@ -70,10 +70,7 @@ struct JumpsCount(i32);
fn main() {
App::new()
.add_plugins((
DefaultPlugins.set(AssetPlugin {
file_path: "asset".into(),
..default()
}),
DefaultPlugins,
ControlsPlugin::<MyAction, MyInputsContainer, MyGameState>::default(),
))
.init_resource::<JumpsCount>()
@@ -131,7 +128,7 @@ struct TextBlock;
const TEXT_SIZE: f32 = 30.;
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
fn setup(mut commands: Commands) {
commands.spawn(Camera2dBundle::default());
commands.spawn((
@@ -139,7 +136,6 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
TextSection::new(
"\nAction: ",
TextStyle {
font: asset_server.load(FIRA_CODE_PATH),
font_size: TEXT_SIZE,
..default()
},