Jump to content

Search the Community

Showing results for tags 'chainedTween'.

  • 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. I have this chainedTween working fine: followPlayer: function() { //var path is recalculated ... var chainedTween = game.add.tween(this.enemy); for (var i = 1; i < path.length; i++) { chainedTween.to({ x: path[0] * this.tileSize, y: path[1] * this.tileSize }, 400 + Math.random() * 200); } chainedTween.start(); } Basically its an enemy following the player. Now I need to "refresh" the tween everytime the player moves. Since the player moves using keyboard keys, the keyboard key isDown event, besides moving the player, also calls the "followPlayer" function. So I added "game.tweens.removeFrom(this.enemy, true);" in order to refresh the tween, but the result was that the enemy don't move while the keyboard key is down, starting to move only when its released.
×
×
  • Create New...