find a way to sharing init

+ vector.normalized()
+ misc
This commit is contained in:
LuckyLaszlo
2022-11-28 04:33:27 +01:00
parent 4aafbac1a5
commit 7f248b5449
10 changed files with 45 additions and 65 deletions

View File

@@ -11,8 +11,9 @@ 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 racketSpeed = Math.floor(w/1.5); // pixel per second
export const ballSpeed = Math.floor(w/2); // pixel per second
export const ballSpeedIncrease = ballSpeed/20; // pixel per second
export const matchStartDelay = 3000; // millisecond
export const newRoundDelay = 1500; // millisecond