Collision

Works with the help of two classes: CollsionComponent and CollisionController

CollsionComponent
Responsibility: receives collision by BoxColider in method OnTriggerEnter.
In OnTriggerEnter method calls CollisionController. Collision(int firstId, int secondId)
On Start inject dependencies CollisionController and DeadCharacterProvider
Place of creation: is set up on prefab in Editor.

CollisionController
Responsibility: when some collision happens it handles this event.
It receives damage if it’s a collision of a character and is destroyed if it’s an arrow. CollisionController handles this type of behavior.
Place of creation: BattleController