Fix wheel spoke drawing using graphics.lineBetween
- Replace add.line() with graphics.lineBetween() - Remove debug lines (no longer needed) - Spokes now draw correctly with proper positioning 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -239,8 +239,8 @@ export default class ShipDeckScene extends Phaser.Scene {
|
||||
wheel.setStrokeStyle(4, 0x654321);
|
||||
|
||||
// Wheel spokes
|
||||
const spokeDebug = this.add.graphics();
|
||||
spokeDebug.lineStyle(2, 0x0000FF, 0.8);
|
||||
const spokes = this.add.graphics();
|
||||
spokes.lineStyle(3, 0x654321);
|
||||
|
||||
for (let i = 0; i < 8; i++) {
|
||||
const angle = (i * 45) * Math.PI / 180;
|
||||
@@ -248,13 +248,7 @@ export default class ShipDeckScene extends Phaser.Scene {
|
||||
const y1 = 200 + Math.sin(angle) * 15;
|
||||
const x2 = 550 + Math.cos(angle) * 35;
|
||||
const y2 = 200 + Math.sin(angle) * 35;
|
||||
this.add.line(0, 0, x1, y1, x2, y2, 0x654321).setLineWidth(3);
|
||||
|
||||
// Debug: Draw blue lines showing spoke endpoints
|
||||
spokeDebug.lineBetween(x1, y1, x2, y2);
|
||||
// Draw circles at endpoints
|
||||
spokeDebug.strokeCircle(x1, y1, 3);
|
||||
spokeDebug.strokeCircle(x2, y2, 3);
|
||||
spokes.lineBetween(x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
wheel.on('pointerdown', () => {
|
||||
|
||||
Reference in New Issue
Block a user