From 2f832bd2e625b1b2a3f5d787cbb6807a7940d6c0 Mon Sep 17 00:00:00 2001 From: Mottributo <87079566+Mottributo@users.noreply.github.com> Date: Sun, 26 Mar 2023 20:51:36 +0300 Subject: [PATCH] text size fix --- sketch.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sketch.js b/sketch.js index 8628fcd..757ed55 100644 --- a/sketch.js +++ b/sketch.js @@ -447,6 +447,7 @@ function setup() { } function startGame(level_start) { floorPos_y = 432; + text_size = sqrt(width) + sqrt(height); // levels of depth where the character, collectable and enemies stand. groundPositions = [ floorPos_y + (height - floorPos_y) / 6, @@ -1064,7 +1065,6 @@ function drawFps() { pop(); } function keyPressed() { - console.log(frameCount + ' pressed ' + key + ' ' + keyCode); if (gameChar.curLives < 1 || flagpole.isReached) { if (keyCode == 32 /*Space*/) { /*Hard resets the game*/ @@ -1092,7 +1092,6 @@ function keyPressed() { if (keyCode == 78 /*N*/) shadows_enabled = !shadows_enabled; } function keyReleased() { - console.log(frameCount + ' released ' + key + ' ' + keyCode); if (keyCode == 65 /*A*/ || keyCode == LEFT_ARROW) gameChar.isLeft = false; if (keyCode == 68 /*D*/ || keyCode == RIGHT_ARROW) gameChar.isRight = false; }