1 decade ago by DaveVoyles
I'm trying to add touch controls to my Win8 game, which I wrote with Impact.
The problem I'm running into however, is that if I check for a mouse down point for my joystick, then I cannot detect another click for my hardcoded buttons (A,B,C). I can either move my ship on screen, or fire bullets, but cannot perform both actions at the same time.
Do any of you know how I can resolve this issue? Is there an alternative approach?
As it stands, my joystick is only being updated and drawn if the player touches the left half of the screen. The buttons however, are always drawn and remain on the right side of the screen.
Here's a link to my joystick code, which I acquired from Jesse Freeman:
And here is my current implementation for it:
The problem I'm running into however, is that if I check for a mouse down point for my joystick, then I cannot detect another click for my hardcoded buttons (A,B,C). I can either move my ship on screen, or fire bullets, but cannot perform both actions at the same time.
Do any of you know how I can resolve this issue? Is there an alternative approach?
As it stands, my joystick is only being updated and drawn if the player touches the left half of the screen. The buttons however, are always drawn and remain on the right side of the screen.
Here's a link to my joystick code, which I acquired from Jesse Freeman:
https://github.com/DaveVoyles/SuperRawrType/blob/master/lib/bootstrap/plugins/touch-joystick.js
And here is my current implementation for it:
http://pastebin.com/TsbAdgMv