This commit is contained in:
David Hain 2023-01-21 08:10:09 +01:00 committed by GitHub
parent e02555234f
commit 4c33b827c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,11 +43,16 @@ function preload() {
floorImage = loadImage(FLOOR_IMAGE_PATH); floorImage = loadImage(FLOOR_IMAGE_PATH);
} }
function setup() { function setup() {
createCanvas(1085, 600); createCanvas(2000, 1000);
floorHeight = height / 5; floorHeight = height / 5;
setupObstacleConsts(); setupObstacleConsts();
setupFont(); setupFont();
setupGame(); setupGame();
var originalSetItem = localStorage.setItem;
localStorage.setItem = function () {
document.createEvent('Event').initEvent('itemInserted', true, true);
originalSetItem.apply(this, arguments);
};
} }
function setupObstacleConsts() { function setupObstacleConsts() {
obstacleOffset = width / OBSTACLE_COUNT; obstacleOffset = width / OBSTACLE_COUNT;