When you first press the left mouse button/touch, my sprite moves to the left.
When you hold down the left mouse button/touch the second time, my sprite moves to the right.
When you hold down the left mouse button/touch the third time, my sprite moves to the left.
When you hold down the left mouse button/touch the fourth time, my sprite moves to the right.
And so on…
I want to swap the move of my sprite in X every time it’s hold down.
I have tested to create a global variabel thats hold 0 or 1 and check if it’s 1 or 1 and move depending on that.