mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
[starling] Don't perform hit test if SkeletonSprite is invisible or untouchable. Closes #1111
This commit is contained in:
parent
8d087341ac
commit
e632d4b94f
Binary file not shown.
@ -226,6 +226,8 @@ package spine.starling {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override public function hitTest(localPoint : Point) : DisplayObject {
|
override public function hitTest(localPoint : Point) : DisplayObject {
|
||||||
|
if (!this.visible || !this.touchable) return null;
|
||||||
|
|
||||||
var minX : Number = Number.MAX_VALUE, minY : Number = Number.MAX_VALUE;
|
var minX : Number = Number.MAX_VALUE, minY : Number = Number.MAX_VALUE;
|
||||||
var maxX : Number = -Number.MAX_VALUE, maxY : Number = -Number.MAX_VALUE;
|
var maxX : Number = -Number.MAX_VALUE, maxY : Number = -Number.MAX_VALUE;
|
||||||
var slots : Vector.<Slot> = skeleton.slots;
|
var slots : Vector.<Slot> = skeleton.slots;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user