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 tests.

+8 -3
+8 -3
immediate_stats/tests/bevy_auto_plugin.rs
··· 4 4 extern crate immediate_stats; 5 5 use crate::{Stat, StatContainer}; 6 6 use bevy_app::App; 7 - use bevy_auto_plugin::prelude::{AutoPlugin, auto_component, auto_init_resource}; 7 + use bevy_auto_plugin::prelude::{ 8 + AutoPlugin, auto_bind_plugin, auto_component, auto_plugin_build_hook, auto_resource, 9 + }; 8 10 use bevy_ecs::prelude::*; 9 11 use immediate_stats::*; 10 12 ··· 13 15 struct MyPlugin; 14 16 15 17 #[derive(Resource, Component, StatContainer, Default, PartialEq, Debug)] 16 - #[auto_component(plugin = MyPlugin)] 17 - #[auto_init_resource(plugin = MyPlugin)] 18 + #[auto_bind_plugin(plugin = MyPlugin)] 19 + #[auto_plugin_build_hook(hook = ResetComponentHook)] 20 + #[auto_plugin_build_hook(hook = ResetResourceHook)] 21 + #[auto_component()] 22 + #[auto_resource(init)] 18 23 struct Health(Stat); 19 24 20 25 #[test]