USE OFFSET

This commit is contained in:
Schluffe
2026-04-05 11:39:53 +02:00
parent f574804f68
commit f9b7e16376
11 changed files with 179 additions and 133 deletions
+2 -7
View File
@@ -100,16 +100,11 @@ const DevTools: Component<{ gameContainer: HTMLElement }> = ({
ctx.lineWidth = 1;
ctx.strokeStyle = "#6572f5";
ctx.strokeRect(
position.value.x - 0.5,
position.value.y - 0.5,
position.value.x - 0.5 + sprite.value.offset.x,
position.value.y - 0.5 + sprite.value.offset.y,
spriteSheet.frameWidth + 1,
spriteSheet.frameHeight + 1,
);
ctx.fillStyle = "#ee459e";
ctx.fillRect(position.value.x - 1, position.value.y - 1, 2, 2);
ctx.beginPath();
ctx.fill();
ctx.restore();
};
};