authoritative server OK

+ TODO actual matchmaking
This commit is contained in:
LuckyLaszlo
2022-11-21 19:46:25 +01:00
parent 48665cfe30
commit add08c216f
20 changed files with 485 additions and 240 deletions

View File

@@ -3,12 +3,18 @@ import {gridDisplay} from "./handleInput.js";
function draw()
{
pong.clear();
drawStatic();
if (gridDisplay) {
drawGrid();
}
gc.midLine.update();
gc.score1.update();
gc.score2.update();
gc.scoreLeft.update();
gc.scoreRight.update();
gc.playerLeft.update();
gc.playerRight.update();
gc.ball.update();
}
function drawStatic()
@@ -18,14 +24,6 @@ function drawStatic()
gc.midLine.update();
}
function drawInit()
{
pong.clear();
drawStatic();
gc.playerLeft.update();
gc.playerRight.update();
}
function drawGrid()
{
gc.w_grid_mid.update();
@@ -37,4 +35,4 @@ function drawGrid()
gc.h_grid_d1.update();
}
export {draw, drawStatic, drawInit, drawGrid}
export {draw, drawStatic, drawGrid}