collision algo with Hugo

+ ball.dir added to EventGameUpdate
This commit is contained in:
LuckyLaszlo
2022-11-25 14:54:17 +01:00
parent 3474d54a2b
commit 4aafbac1a5
6 changed files with 93 additions and 37 deletions

View File

@@ -7,12 +7,12 @@ export const w = CanvasWidth;
export const h = CanvasWidth / CanvasRatio;
export const w_mid = Math.floor(w/2);
export const h_mid = Math.floor(h/2);
export const pw = Math.floor(w/50);
export const ph = pw*5;
export const pw = Math.floor(w/60);
export const ph = pw*6;
export const ballSize = pw;
export const wallSize = Math.floor(w/100);
export const playerSpeed = Math.floor(w/1.5); // pixel per second
export const ballSpeed = Math.floor(w/1.5); // pixel per second
export const ballSpeed = Math.floor(w/2); // pixel per second
export const matchStartDelay = 3000; // millisecond
export const newRoundDelay = 1500; // millisecond