Jump to content

Mouse Click Event


Recommended Posts



Excuse me for very stupid question but I'm newbie in Phaser and in programming (and in English too :) )


I don't know how to activate function when user click left button (anywhere on the screen)


I try to use this code

function update () {	if (game.input.onDown)    {        Shoot(bullet.x);    }}

(shoot - function which create bullet at coordinate of player)


But with it "bullets" created one by one without clicking. I know how to do this with keysm but I want to use mouse.


Help me, please.

Thank you!



Link to comment
Share on other sites

  • 3 months later...

  • Recently Browsing   0 members

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