Immediate Stats
Game stats that reset every frame, inspired by immediate mode GUI.
This makes it easy to implement temporary buffs/debuffs, and effects that change over time. Using a derive macro, stat resets are propagated to any stat fields, making it easy to compose stats into more complex objects.
;
Bevy
There is build-in integration with the Bevy Engine via the bevy feature flag.
This adds plugins for resetting StatContainer components and resources.
;
Bevy Auto Plugin
If you use Bevy Auto Plugin, you can also use the bevy_auto_plugin feature flag.
This automatically registers the required system(s) by leveraging the existing auto_component and auto_resource macros.
;
// `StatContainer` derive hooks into the existing `auto_component` and `auto_resource` macros.
// Adds `reset_component_modifiers` system.
// Adds `reset_resource_modifiers` system.
;
It is important to note that this only works when the derive is above the auto_* macro,
and does not work with auto_bind_plugin.
Version Compatibility
| Bevy | Immediate Stats |
|---|---|
0.18 |
0.4 |
0.17 |
0.3 |
0.16 |
0.1 - 0.2 |