Jump to content

Problem: onInputDown triggered only once


javascript
 Share

Recommended Posts

Click event fired only once, i don't know why, someone can help me. Thanks

bubblesData.forEach(function(bubble, index) {	var graphics = new Phaser.Graphics(game, 0, 0);	graphics.boundsPadding = 0;	graphics.beginFill(0x4E3794, 1);	graphics.drawCircle(bubble.x, bubble.y, bubble.diameter);	graphics.hitArea = new Phaser.Circle(bubble.x, bubble.y, bubble.diameter);	var texture = graphics.generateTexture();	bubbles[index] = game.add.sprite(bubble.x, bubble.y, texture);	bubbles[index].inputEnabled = true;	bubbles[index].bubble = bubble;	bubbles[index].events.onInputDown.add(puzzle.unfold, this);});
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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