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" edition = "2021"
[features] [features]
default_font = [] x11 = ["bevy/x11", "bevy/bevy_winit"]
x11 = ["bevy/x11"] wayland = ["bevy/wayland", "bevy/bevy_winit"]
wayland = ["bevy/wayland"]
windows = ["bevy/bevy_winit"] windows = ["bevy/bevy_winit"]
[dependencies] [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 = "./../../" } bevy_controls = { path = "./../../" }
strum = "0.25.0" strum = "0.25.0"
strum_macros = "0.25.3" strum_macros = "0.25.3"
@@ -70,10 +70,7 @@ struct JumpsCount(i32);
fn main() { fn main() {
App::new() App::new()
.add_plugins(( .add_plugins((
DefaultPlugins.set(AssetPlugin { DefaultPlugins,
file_path: "asset".into(),
..default()
}),
ControlsPlugin::<MyAction, MyInputsContainer, MyGameState>::default(), ControlsPlugin::<MyAction, MyInputsContainer, MyGameState>::default(),
)) ))
.init_resource::<JumpsCount>() .init_resource::<JumpsCount>()
@@ -131,7 +128,7 @@ struct TextBlock;
const TEXT_SIZE: f32 = 30.; 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(Camera2dBundle::default());
commands.spawn(( commands.spawn((
@@ -139,7 +136,6 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
TextSection::new( TextSection::new(
"\nAction: ", "\nAction: ",
TextStyle { TextStyle {
font: asset_server.load(FIRA_CODE_PATH),
font_size: TEXT_SIZE, font_size: TEXT_SIZE,
..default() ..default()
}, },