Constructor
new(Sprite:FlxExtendedSprite, RetainVelocity:Bool = false, Tension:Float = 0.1, Friction:Float = 0.95, Gravity:Float = 0)
Adds a spring between the mouse and a FlxExtendedSprite.
Parameters:
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!) |