aduros/flambe — pull request #116 by volkipp (2013-05-13 21:20:37+00:00)
Title: Add a Sine behavior for quick, simple, sine wave based animations.

If you're interested in this, we use it on many of our projects. It's great for quick effects you don't want to wire up a full Script for. Here are some examples:

// Flashing a Sprite 4 times for attention.
attention.get(Sprite).alpha.behavior = new Sine(1, .3, .2, 4);

// Make an endlessly bouncing and rotating button (best if the anchor is centered).
happyButton.get(Sprite).scaleX.behavior = new Sine(1, .6, .4, 0);
happyButton.get(Sprite).scaleY.behavior = new Sine(1, .6, .4, 0);
happyButton.get(Sprite).rotation.behavior = new Sine(-25, 25, .7, 0);

Signed-off-by: Kipp Ashford