Presented by IHittablesManager interface, this system stores collection of all active Hittable objects in game, sorted by teams. It helps to find nearest hittables in certain point within certain radius.
To use this system, inject IHittablesManager interface into your class, as shown below:
[Inject]privateIHittablesManagerhittablesManager;
This system is not presented on LoadingScene, so you should add it onto the needed scenes where battles will occur.
Available methods
voidRegisterHittable(Hittablehittable)
This method registers hittable object in manager. Other characters and projectiles will be able to find it.
This method is automatically called from Hittable class during its appearance, so you don't need to call it from your classes inherited from Hittable, in most of cases.
voidUnregisterHittable(Hittablehittable)
This method unregisters hittable object from manager. Other characters and projectiles will not be able to find it.
This method is automatically called from Hittable class during its death, so you don't need to call it from your classes inherited from Hittable, in most of cases.