authoritative server OK
+ TODO actual matchmaking
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user