pieces fit together right but their position and dragging is broken

This commit is contained in:
2022-07-08 23:50:35 +00:00
parent 5fa18b4ba0
commit b63470fff3
3 changed files with 29 additions and 32 deletions

View File

@@ -32,7 +32,7 @@ import jigsawx.math.Vec2;
class HabitState extends FlxState {
public function drawPieceShape( surface: FlxSprite, jig: JigsawPiece, c: FlxColor )
{
var points = [for (point in jig.getPoints()) new FlxPoint(point.x, point.y)];
var points = [for (point in jig.getPoints()) new FlxPoint(jig.xy.x + point.x, jig.xy.y + point.y)];
points.push(points[0]);
FlxSpriteUtil.drawPolygon(
surface,