text size fix
This commit is contained in:
parent
bd6c575677
commit
2f832bd2e6
@ -447,6 +447,7 @@ function setup() {
|
|||||||
}
|
}
|
||||||
function startGame(level_start) {
|
function startGame(level_start) {
|
||||||
floorPos_y = 432;
|
floorPos_y = 432;
|
||||||
|
text_size = sqrt(width) + sqrt(height);
|
||||||
// levels of depth where the character, collectable and enemies stand.
|
// levels of depth where the character, collectable and enemies stand.
|
||||||
groundPositions = [
|
groundPositions = [
|
||||||
floorPos_y + (height - floorPos_y) / 6,
|
floorPos_y + (height - floorPos_y) / 6,
|
||||||
@ -1064,7 +1065,6 @@ function drawFps() {
|
|||||||
pop();
|
pop();
|
||||||
}
|
}
|
||||||
function keyPressed() {
|
function keyPressed() {
|
||||||
console.log(frameCount + ' pressed ' + key + ' ' + keyCode);
|
|
||||||
if (gameChar.curLives < 1 || flagpole.isReached) {
|
if (gameChar.curLives < 1 || flagpole.isReached) {
|
||||||
if (keyCode == 32 /*Space*/) {
|
if (keyCode == 32 /*Space*/) {
|
||||||
/*Hard resets the game*/
|
/*Hard resets the game*/
|
||||||
@ -1092,7 +1092,6 @@ function keyPressed() {
|
|||||||
if (keyCode == 78 /*N*/) shadows_enabled = !shadows_enabled;
|
if (keyCode == 78 /*N*/) shadows_enabled = !shadows_enabled;
|
||||||
}
|
}
|
||||||
function keyReleased() {
|
function keyReleased() {
|
||||||
console.log(frameCount + ' released ' + key + ' ' + keyCode);
|
|
||||||
if (keyCode == 65 /*A*/ || keyCode == LEFT_ARROW) gameChar.isLeft = false;
|
if (keyCode == 65 /*A*/ || keyCode == LEFT_ARROW) gameChar.isLeft = false;
|
||||||
if (keyCode == 68 /*D*/ || keyCode == RIGHT_ARROW) gameChar.isRight = false;
|
if (keyCode == 68 /*D*/ || keyCode == RIGHT_ARROW) gameChar.isRight = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user