So I have the MouseClickSystem working. It handles Clickable.Class and Pos.Class.
However, I want to be able to handle mouse clicks that are not associated with any object. Yes, inside of MouseClickSystem, I can test to see if the cursor is not overlapping any Clickable entity, but that is potentially hundreds or thousands of entities. And it would consume processing for each mouse click.
A listener based mouse system which I assume many games use doesn't have this issue.
Is there an easy method to detect if the click occurred for example on the TileMapped but not a Clickable.Class?
So I have the MouseClickSystem working. It handles Clickable.Class and Pos.Class.
However, I want to be able to handle mouse clicks that are not associated with any object. Yes, inside of MouseClickSystem, I can test to see if the cursor is not overlapping any Clickable entity, but that is potentially hundreds or thousands of entities. And it would consume processing for each mouse click.
A listener based mouse system which I assume many games use doesn't have this issue.
Is there an easy method to detect if the click occurred for example on the TileMapped but not a Clickable.Class?