I have the following code:
var lion = game.add.sprite(2, 2,'lion');
var jump = game.add.tween(lion);
jump.to({x: 1000, y: 1000 }, 10000, Phaser.Easing.Linear.None);
// ...
jump.start();
I create a sprite and would like to make it move between two points, here I am moving the lion from the top left corner to some point at the bottom right (1000,1000). Is it possible to add a bouncing motion to this movement?
At the moment the lion is moving in a straight line, but I would like to make it look as if the lion were jumping, like this:
How would I achieve this? Are tweens actually capable of producing a complex path like this?