Hi all, I am after some insight on a design issue i am having. I am writing a basic 2d game. The gameplay requires the user to click and drag the mouse on particular entities.
I am after some insight on how i might handle this.
At the moment (just to get it working) i have put the handling within scene nodes.
The game view forwards messages to the scene, which forwards the messages to all scene nodes until one consumes it (or not).
I do not want to keep it like this because scene nodes are meant for rendering.
However it is convenient, because my scene nodes contain the data needed for 'screen position' of the entities which I am using for hit testing.
I appreciate any advice, hints and ideas.
Thanks in advance.
I am after some insight on how i might handle this.
At the moment (just to get it working) i have put the handling within scene nodes.
The game view forwards messages to the scene, which forwards the messages to all scene nodes until one consumes it (or not).
I do not want to keep it like this because scene nodes are meant for rendering.
However it is convenient, because my scene nodes contain the data needed for 'screen position' of the entities which I am using for hit testing.
I appreciate any advice, hints and ideas.
Thanks in advance.