game: paddle can move

This commit is contained in:
2024-01-17 14:47:53 +01:00
parent 2bd0624100
commit 3dc07803eb
2 changed files with 4 additions and 9 deletions

View File

@ -47,23 +47,18 @@ class Game
this.time = new Time();
this.last_pos = null
this._inited = false;
this._wall_drew = false;
return 0;
}
draw_sides(ctx)
{
if (this._wall_drew !== true)
{
this.walls.forEach(wall => {
wall.draw(ctx);
});
}
this.walls.forEach(wall => {
wall.draw(ctx);
});
this.players.forEach(player => {
player.draw(ctx);
});
this._wall_drew = true;
}
draw(ctx)