This component is the core class to affect character stats, react and interact with other character and objects in a scene.
It uses the IMDamager and IInteractor interfaces.
E.g. If an animal is affected any of the Damager components The Health Stat will be reduced and the Animal will react by doing a Damage Mode animation.
Enable/Disable the Damager.
Index of the Damager. Often used by the Animator know which damager to enable/disable via an Animation.
Layers to interact with objects. By default, the layer is set that affects only the Animal Layer.
Set the Interaction that the Damager will have with Triggers.
When the Damager is using Raycast or OnTriggerEnter, sometimes it can register colliders inside the same hierarchy the Damager is. When this option is enabled, these colliders will be ignored.
By default, the Owner is the Root of the hierarchy. But it can be set Manually to another gameobject. If this value is set to null, it will be set again to the Root of the hierarchy.
When a Damager register a collider, it will find a Stats Component on its hierarchy and it will apply the modification to a Stat.
The critical damage will apply a chance to increase or decrease the final value of the Stat modifier
Probability of making a critical damage
The Stat Modifier value will be multiplied by this value if the critical chance is true.
When a Damager register a collider, it will apply a force to the attached rigidbody.
Amount of force applied
Type of force to apply on the ApplyForce() method.
The Damager receiver will apply its default Animal Reaction
Index to send to the Interactable