Fork me on GitHub

Emitter backward animation

Since v2.4.1 by XXLTomate

import com.haxepunk.graphics.Emitter;

You can specify if you want your emitter to animate the particles backward, for instance instead of going from the emitter in a circle they'll go from the circle toward the emitter.

emitter.setMotion(name:String, angle:Float, distance:Float, duration:Float, ?angleRange:Float = 0, ?distanceRange:Float = 0, ?durationRange:Float = 0, ?ease:EaseFunction = null, ?backwards:Bool = false);

(arguments preceded by a '?' can be omitted.)

Cookbook

  • Trace capture in console
  • Joystick button mapping
  • Drawing multiple scenes
  • Tileset spacing