In my Libgdx project i need to handle several types of inputs.
In particular these input events are needed in order to interact with the Actors that the user puts in the Stage.
The possible interactions are:
1) Drag And Drop with DragAndDrop class.
2) Rotate the Actor (90 degrees clockwise each time)
3) Remove the Actor
I thought that i could rotate the Actor with a simple click (touchDown), and remove the Actor with double tap, but this strategy gives rise to some issues.
1) When the user does double tap on the Actor, before the Actors gets removed it rotates 2 times.
2) If the user wants to drag and drop the Actor, when he clicks on the Actor it rotates.
Then, i thought that i could rotate the Actor in the touchUp method, only if the current position of the Actor is the same as before in order to avoid to rotate the Actor when the user just want to move it.
This gives rise to another problem. In order to detect the double tap, i need to implement GestureListener interface that does not have the touchUp method!
I could remove the actor when the user does long press on it, but this will be a game that will require fast interaction.
So.. i need your help, any kind of help, thank you very much!