AAAAAAAAAAAAAAAAAAAAAAAAH

This commit is contained in:
Kbz-8
2024-02-10 19:38:56 +01:00
parent f9e9538159
commit 54c4ae77f2
8 changed files with 134 additions and 93 deletions

View File

@ -74,7 +74,10 @@ class Game
*/
draw(ctx)
{
ctx.clearRect(0, 0, this.config.size_x, this.config.size_y);
if(ctx instanceof CanvasRenderingContext2D)
{
ctx.clearRect(0, 0, this.config.size_x, this.config.size_y);
}
this.draw_sides(ctx);
this.ball.draw(ctx);
}