v1 #4
1個のファイルの変更、13行の追加、0行の削除
|
|
@ -186,6 +186,19 @@ class Render {
|
||||||
this.ctx.stroke();
|
this.ctx.stroke();
|
||||||
this.ctx.closePath();
|
this.ctx.closePath();
|
||||||
});
|
});
|
||||||
|
//on draw le centre du joueur
|
||||||
|
this.ctx.beginPath();
|
||||||
|
this.ctx.fillStyle="blue"
|
||||||
|
this.ctx.arc(player.x, player.y, 3, 0, 2 * Math.PI);
|
||||||
|
this.ctx.fill();
|
||||||
|
this.ctx.closePath();
|
||||||
|
//on draw les collisions autour du joueur
|
||||||
|
this.ctx.beginPath();
|
||||||
|
this.ctx.strokeStyle="red"
|
||||||
|
this.ctx.arc(player.x, player.y, playerSize/2, 0, 2 * Math.PI);
|
||||||
|
this.ctx.lineWidth="2";
|
||||||
|
this.ctx.stroke();
|
||||||
|
this.ctx.closePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
cars.forEach((car) => {
|
cars.forEach((car) => {
|
||||||
|
|
|
||||||
読み込み中…
新しいイシューから参照