pieces rotate good!
This commit is contained in:
@@ -42,8 +42,8 @@
|
|||||||
(doFor s rewardSprites
|
(doFor s rewardSprites
|
||||||
null
|
null
|
||||||
// Uncomment for debugging piece rotation:
|
// Uncomment for debugging piece rotation:
|
||||||
(debugLayer.drawCircle s.x s.y 1 FlxColor.RED)
|
//(debugLayer.drawCircle s.x s.y 1 FlxColor.RED)
|
||||||
(debugLayer.drawCircle (+ s.x s.origin.x) (+ s.y s.origin.y) 1 FlxColor.LIME)
|
//(debugLayer.drawCircle (+ s.x s.origin.x) (+ s.y s.origin.y) 1 FlxColor.LIME)
|
||||||
// Uncomment for debugging match zones:
|
// Uncomment for debugging match zones:
|
||||||
**(let [matchZones [(matchZoneLeft s) (matchZoneRight s)(matchZoneUp s)(matchZoneDown s)]]
|
**(let [matchZones [(matchZoneLeft s) (matchZoneRight s)(matchZoneUp s)(matchZoneDown s)]]
|
||||||
(doFor z matchZones
|
(doFor z matchZones
|
||||||
|
@@ -64,8 +64,8 @@ class KissExtendedSprite extends flixel.addons.display.FlxExtendedSprite {
|
|||||||
var sCenter = new FlxPoint(s.x + s.origin.x, s.y + s.origin.y);
|
var sCenter = new FlxPoint(s.x + s.origin.x, s.y + s.origin.y);
|
||||||
var offset = sCenter.subtractPoint(thisCenter);
|
var offset = sCenter.subtractPoint(thisCenter);
|
||||||
offset.rotate(new FlxPoint(0, 0), deg);
|
offset.rotate(new FlxPoint(0, 0), deg);
|
||||||
s.x = x + offset.x;
|
s.x = thisCenter.x + offset.x - s.origin.x;
|
||||||
s.y = y + offset.y;
|
s.y = thisCenter.y + offset.y - s.origin.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_rot(this, deg);
|
_rot(this, deg);
|
||||||
|
Reference in New Issue
Block a user