Jump to content

Phaser Touch Input


Temorinkitojimo
 Share

Recommended Posts

Hi everyone!

 

I am currently doing the Flappy Bird Tutorial on lessmilk.com.

In the tutorial, the jump function is called when the spacekey is hit.

     // Call the 'jump' function when the spacekey is hit        var space_key = this.game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR);        space_key.onDown.add(this.jump, this);

I would like to add touch input to the game, however when I add:

 game.input.pointer1.isDown(this.jump, this);

the game does not even start (I can make the "bird" go up and down, but the pipes aren't coming.

 

Can someone lead me to the right path?

 

Link to comment
Share on other sites

  • 3 months later...
 Share

  • Recently Browsing   0 members

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