Game stats that reset every frame, inspired by immediate mode GUI.
gamedev bevy stats
0
fork

Configure Feed

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

Update Auto Plugin example.

+3 -3
+3 -3
immediate_stats/examples/simple_bevy_auto_plugin.rs
··· 3 3 4 4 use bevy::prelude::*; 5 5 use bevy_auto_plugin; 6 - use bevy_auto_plugin::prelude::{AutoPlugin, auto_component, auto_system}; 6 + use bevy_auto_plugin::prelude::{AutoPlugin, auto_plugin_build_hook, auto_system}; 7 7 use immediate_stats::*; 8 8 9 9 fn main() { ··· 17 17 struct SpeedPlugin; 18 18 19 19 // Implements `reset_modifiers` by passing the call onto `Stat`. 20 - // This will also add the `ResetComponentPlugin` to `SpeedPlugin`. 21 20 #[derive(StatContainer, Component)] 22 - #[auto_component(plugin = SpeedPlugin)] 21 + // Use hook to add the `ResetComponentPlugin` to `SpeedPlugin` automatically. 22 + #[auto_plugin_build_hook(plugin = SpeedPlugin, hook = ResetComponentHook)] 23 23 struct Speed(Stat); 24 24 25 25 #[auto_system(plugin = SpeedPlugin, schedule = Startup)]