Jump to content

Search the Community

Showing results for tags 'phaser sprite input'.

  • 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 2 results

  1. Hey, I'm trying to get sprite to follow path user created after mouse up event. i think I need to add timer here or use the update loop, but not sure how. help will be appreciated strategy: enable history, add event to sprite, iterate over history and travel along the XY coords code: newSprite: function (parent, x, y, sideStr){ var sprite= parent.create(x, y, sideStr); sprite.rotation = 1.61; sprite.inputEnabled = true; sprite.events.onInputDown.add(this.onD, this); sprite.events.onInputUp.add(this.onU, this); return sprite; }, onU : function(sprite, pointer){ var speed = 200; if(sprite.key === "enemy" || !pointer._history.length) return; pointer._history.forEach(function(v){ if(speed + 1 < 500) speed++; this.game.time.events.loop(Phaser.Timer.SECOND); this.game.physics.arcade.accelerateToXY(sprite, v.x, v.y, speed, 900) })
  2. in Phaser 1.1.6 i start input events of sprite this: sprite.input.start();but Phaser 2.0 is can't start. it's ask me start(); is null Thank you #rich
×
×
  • Create New...