Stats
Last updated
Last updated
Stats are advanced float values that are used to identify Attributes on the Animal and respond to their changes. They are managed on the Stats Component, on a list of Stat.
E.g. if the Health stat gets to zero we can Activate the State on the animal.
Enable/Disable a stat
ID is the Identifier scriptable object used to know which stat is which... the Name of the Scriptable asset works too as the name of the Stat.
Current Value of the stat
Multiplier for the stat. this will modify result of the methods that changes the Value of the stat. This can be used to reduce the Health by half if the Animal has armor, or make double damage if the animal is vulnerable.
Minimum Value of the stat
Maximum value of the stat
Allows the Stat to Regenerate
How fast the Stat will regenerate
When the value of the stat changes, it will wait X amount of time until the Regeneration logic is activated.
Allows the Stat to Degenerate
How fast the stat will degenerate
When the value of the stat changes, it will wait X amount of time until the Degeneration logic is activated.
When the stat.Reset() method is called the Value will go to the Max or Min Value depending this parameter.
Time needed to pass so the stat can be modified again.
Is invoked when the stat value is changed.
Is invoked when the stat value changes, but with a normalized value, using the Min and Max value stat
Is invoked when the Stat's Max Value is changed
Is invoked when the stat becomes active
Is invoked when the Stat value is equal to the Max Stat value
Is invoked when the Stat value is equal to the Min Stat value
Invoked when the Stat is regenerating
Invoked when the stat is degenerating
Invoked when the stat value is below X
Invoked when the stat value is above X