alexcurtis

Members
  • Content count

    5
  • Joined

  • Last visited

About alexcurtis

  • Rank
    Newbie

Recent Profile Visitors

218 profile views
  1. Very Nice. Thank you so much lewster32. :-)
  2. Is it possible to plumb a routine callback into a tween? -- or is it on the update method? I could probably just override the sprite update call and pull in the tint. Would that be efficient? EDIT: Thanks wayfinder. I think I have a decent solution using your suggestion.
  3. Hi, Is it possible to tween a tint? So going from the default 0xFFF to a slightly darker tint 0x757575 over a period of time. Ive tried: tween.to({ tint: 0x757575 }, 5000, Phaser.Easing.Linear.None);But it seems to cycle through R,G,B or something to create some crazy colours until it reaches the end tint. Really all I want to do is darken the sprite over a period of time. Many Thanks, -Alex
  4. After a bit of messing around and debugging through Phaser's code (this stuff isn't too well documented). It looks like the to construct needs changing to an array based format: var tween = this.game.add.tween(obj.sprite).to({ x: [300, 800, 900, 0], y: [600, 600, 200, 0], angle: [360]}, 5000).interpolation(function(v, k){ return Phaser.Math.catmullRomInterpolation(v, k);});
  5. I couldn't seem to get the bezier interpolation working correctly in 2.0.4: var tween = this.game.add.tween(obj).to({ x: 600 }, 2000) .to({ y: 300 }, 1000, Phaser.Easing.Exponential.InOut) .to({ x: 100 }, 2000, Phaser.Easing.Exponential.InOut) .to({ y: 100 }, 1000, Phaser.Easing.Exponential.InOut) .interpolation(Phaser.Math.bezierInterpolation) .loop() .start();Many Thanks.