game: add: padding to collision
This commit is contained in:
@ -107,6 +107,10 @@ class Game
|
||||
ctx.clearRect(0, 0, this.config.size_x, this.config.size_y);
|
||||
this.draw_sides(ctx);
|
||||
this.ball.render(ctx);
|
||||
|
||||
ctx.strokeStyle = "#000000";
|
||||
ctx.lineWidth = this.config.stroke_thickness;
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
_send(data)
|
||||
|
@ -77,8 +77,13 @@ class GameConfig
|
||||
*/
|
||||
this.ball_spawn_y = this.center_y;
|
||||
|
||||
/**
|
||||
* @type {Number}
|
||||
*/
|
||||
this.stroke_thickness = response_data.STROKE_THICKNESS;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
export { GameConfig }
|
||||
export { GameConfig };
|
Reference in New Issue
Block a user