An experimental, status effects-as-entities system for Bevy.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add margin to examples' UI.

+28 -4
+7 -1
examples/immediate_stats/decaying_speed.rs
··· 34 34 /// Spawn a target on startup. 35 35 fn init_scene(mut commands: Commands) { 36 36 commands.spawn((Name::new("Target"), MovementSpeed(Stat::new(100)))); 37 - commands.spawn(Text::default()); 37 + commands.spawn(( 38 + Node { 39 + margin: UiRect::all(Val::Px(10.0)), 40 + ..default() 41 + }, 42 + Text::default(), 43 + )); 38 44 commands.spawn(Camera2d); 39 45 } 40 46
+7 -1
examples/immediate_stats/decaying_speed_auto_plugin.rs
··· 37 37 #[auto_system(plugin = DecayingSpeedPlugin, schedule = Startup)] 38 38 fn init_scene(mut commands: Commands) { 39 39 commands.spawn((Name::new("Target"), MovementSpeed(Stat::new(100)))); 40 - commands.spawn(Text::default()); 40 + commands.spawn(( 41 + Node { 42 + margin: UiRect::all(Val::Px(10.0)), 43 + ..default() 44 + }, 45 + Text::default(), 46 + )); 41 47 commands.spawn(Camera2d); 42 48 } 43 49
+7 -1
examples/poison.rs
··· 28 28 /// Spawn a target on startup. 29 29 fn init_scene(mut commands: Commands) { 30 30 commands.spawn((Name::new("Target"), Health(100))); 31 - commands.spawn(Text::default()); 31 + commands.spawn(( 32 + Node { 33 + margin: UiRect::all(Val::Px(10.0)), 34 + ..default() 35 + }, 36 + Text::default(), 37 + )); 32 38 commands.spawn(Camera2d); 33 39 } 34 40
+7 -1
examples/poison_falloff.rs
··· 34 34 /// Spawn a target on startup. 35 35 fn init_scene(mut commands: Commands) { 36 36 commands.spawn((Name::new("Target"), Health(500))); 37 - commands.spawn(Text::default()); 37 + commands.spawn(( 38 + Node { 39 + margin: UiRect::all(Val::Px(10.0)), 40 + ..default() 41 + }, 42 + Text::default(), 43 + )); 38 44 commands.spawn(Camera2d); 39 45 } 40 46