WIP, tout est en chantier, très content :)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as g from "./global.js"
|
||||
import {pong, gc, clientInfo} from "./global.js"
|
||||
import {gridDisplay} from "./handleInput.js";
|
||||
|
||||
function draw()
|
||||
@@ -6,35 +6,35 @@ function draw()
|
||||
if (gridDisplay) {
|
||||
drawGrid();
|
||||
}
|
||||
g.midLine.update();
|
||||
g.score1.update();
|
||||
g.score2.update();
|
||||
gc.midLine.update();
|
||||
gc.score1.update();
|
||||
gc.score2.update();
|
||||
}
|
||||
|
||||
function drawStatic()
|
||||
{
|
||||
g.wall_top.update();
|
||||
g.wall_bottom.update();
|
||||
g.midLine.update();
|
||||
gc.wallTop.update();
|
||||
gc.wallBottom.update();
|
||||
gc.midLine.update();
|
||||
}
|
||||
|
||||
function drawInit()
|
||||
{
|
||||
g.pong.clear();
|
||||
pong.clear();
|
||||
drawStatic();
|
||||
g.player1.update();
|
||||
g.player2.update();
|
||||
gc.playerLeft.update();
|
||||
gc.playerRight.update();
|
||||
}
|
||||
|
||||
function drawGrid()
|
||||
{
|
||||
g.w_grid_mid.update();
|
||||
g.w_grid_u1.update();
|
||||
g.w_grid_d1.update();
|
||||
gc.w_grid_mid.update();
|
||||
gc.w_grid_u1.update();
|
||||
gc.w_grid_d1.update();
|
||||
|
||||
g.h_grid_mid.update();
|
||||
g.h_grid_u1.update();
|
||||
g.h_grid_d1.update();
|
||||
gc.h_grid_mid.update();
|
||||
gc.h_grid_u1.update();
|
||||
gc.h_grid_d1.update();
|
||||
}
|
||||
|
||||
export {draw, drawStatic, drawInit, drawGrid}
|
||||
|
||||
Reference in New Issue
Block a user