Jump to content

Help with touch?


CaueCR
 Share

Recommended Posts

Hello! Sorry to bother with a possibly stupid question, but I really need help. I've started to use Phaser two days ago and I am trying to make a simple card game.

In this game, you have four cards in the screen, you click the equal ones, and you go to the next level. It's really simple, but I'm having trouble finding a tutorial or example about mouse/touch events. I really need to make it work with both the mouse and touch, because I'm aiming to try the game in the desktop and mobile browser.

I would really appreciate if anyone can help me, if necessary I can put my code here.

Any help would be welcome!

Thanks for your time!
Cauê.

Link to comment
Share on other sites

It's working! Thanks to BunBunBun and the "tanks" example! 

But I have another problem now, I have a counter that increments when I click on a card. The problem is, when I click the counter gets updated way too much.

When I click once, it increments 5 or 6 times. Anyone know a way for me to delimit that? I need it to increment exactly once per click.

Thanks for your time!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...