class flixel.addons.display.FlxMouseSpring
Available on all platforms
Instance Fields
The gravity controls how far "down" the spring hangs (use a negative value for it to hang up!) * @default 0
The tension of the spring, smaller numbers create springs closer to the mouse pointer * @default 0.1
function new(Sprite:FlxExtendedSprite, ?RetainVelocity:Bool = false, ?Tension:Float = 0.1f, ?Friction:Float = 0.95f, ?Gravity:Float = 0):Void
Adds a spring between the mouse and a FlxExtendedSprite. * *
Sprite | The FlxExtendedSprite to which this spring is attached * |
RetainVelocity | True to retain the velocity of the spring when the mouse is released, or false to clear it * |
Tension | The tension of the spring, smaller numbers create springs closer to the mouse pointer * |
Friction | The friction applied to the spring as it moves * |
Gravity | The gravity controls how far "down" the spring hangs (use a negative value for it to hang up!) |