Jump to content

Search the Community

Showing results for tags 'ondragstop'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. So I have two event listeners in my game which work great drop.events.onDragStart.add(this.onDragStart, this); drop.events.onDragStop.add(this.onDragStop, this); But the callback only gets trigggered when the click takes place over the sprite. I want the event to trigger if the pointer is already down and then it moves over the sprite, is there any way to do that? One solution would be to use onInputOver drop.events.onInputOver.add(this.onInputOver, this); But that won't tell the sprite to be dragged, Is there a way to manually trigger events in Phaser? EDIT Ok I found a solution that works use onInputOver and manually start the drag. onInputOver: function(sprite, pointer){ if(pointer.isDown){ sprite.input.startDrag(pointer); } },
×
×
  • Create New...