Selection Service
public sealed class SelectionService : StateService<SelectionState>, IInitSystem
This class handles all selection actions in the game. It contains a lot of selection events, and allows you to easily add new actions on these events.
Selection events usage example:
public class ExampleSelection : IInitSystem, IDisposable
{
[Inject] SelectionService selection;
public void Init()
{
selection.SelectionStarted += OnStartSelection;
}
public void Dispose()
{
selection.SelectionStarted -= OnStartSelection; // don't forget to unsubscribe from any events on OnDestroy/OnDisable/Dispose
}
void OnStartSelection()
{
// do your actions here
}
}