This commit is contained in:
Kbz-8
2024-02-14 20:22:07 +01:00
committed by AdrienLSH
parent 8643f3ef15
commit 4d126c1683
5 changed files with 192 additions and 18 deletions

View File

@ -1,6 +1,7 @@
import { Game } from "./Game.js";
import { Point } from "./Point.js";
import { Segment } from "./Segment.js";
import { renderCube } from "../../3D/cube.js"
class Player
{
@ -62,8 +63,11 @@ class Player
{
if (this.is_connected === false)
{
ctx.moveTo(this.rail.start.x, this.rail.start.y);
ctx.lineTo(this.rail.stop.x, this.rail.stop.y);
if(ctx instanceof CanvasRenderingContext2D)
{
ctx.moveTo(this.rail.start.x, this.rail.start.y);
ctx.lineTo(this.rail.stop.x, this.rail.stop.y);
}
return;
}