Animate a sprite to move like a pendulum for phaser