add onSelected callback to KissExtendedSprite
This commit is contained in:
@@ -109,6 +109,11 @@ class DragToSelectPlugin extends FlxBasic {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (s in dragState.selectedSprites) {
|
||||||
|
if (s.onSelected != null) {
|
||||||
|
s.onSelected();
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (!rect.isEmpty) {
|
} else if (!rect.isEmpty) {
|
||||||
dragState.debugLayer.drawFlxRect(rect);
|
dragState.debugLayer.drawFlxRect(rect);
|
||||||
}
|
}
|
||||||
|
@@ -138,6 +138,8 @@ class KissExtendedSprite extends flixel.addons.display.FlxExtendedSprite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public var onSelected:Void->Void = null;
|
||||||
|
|
||||||
public function pixelPerfectDrag() {
|
public function pixelPerfectDrag() {
|
||||||
return _dragPixelPerfect;
|
return _dragPixelPerfect;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user