stopDrag() call onStopDrag() for all dragged sprites
This commit is contained in:
@@ -65,10 +65,15 @@ class KissExtendedSprite extends flixel.addons.display.FlxExtendedSprite {
|
|||||||
public override function stopDrag() {
|
public override function stopDrag() {
|
||||||
super.stopDrag();
|
super.stopDrag();
|
||||||
|
|
||||||
if(onStopDrag != null){
|
|
||||||
var spriteTotalMovement = new FlxPoint(x - dragStartPos.x, y - dragStartPos.y);
|
var spriteTotalMovement = new FlxPoint(x - dragStartPos.x, y - dragStartPos.y);
|
||||||
|
if(onStopDrag != null){
|
||||||
onStopDrag(spriteTotalMovement);
|
onStopDrag(spriteTotalMovement);
|
||||||
}
|
}
|
||||||
|
for(sprite in connectedAndSelectedSprites()) {
|
||||||
|
if(sprite.onStopDrag != null) {
|
||||||
|
sprite.onStopDrag(spriteTotalMovement);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var rotationPadding = new FlxPoint();
|
private var rotationPadding = new FlxPoint();
|
||||||
|
|||||||
Reference in New Issue
Block a user