pub trait StatModifierAdd<T: StatType<DataType: Add>> {
// Provided method
fn add(&self) -> T::DataType { ... }
}Expand description
A modifier to a Stat that adds to it.
Must be registered with AppExt::add_stat_modifier_add.
#[derive(Component)]
struct MyStatModifier;
impl StatModifierAdd<MyStat> for MyStatModifier {
fn add(&self) -> f32 {
0.2
}
}Provided Methods§
Sourcefn add(&self) -> T::DataType
fn add(&self) -> T::DataType
Addition to the total, after StatModifierMul::mul_before but before StatModifierMul::mul_after.