Skip to content

Commit

Permalink
update metadata for Super_Platformer; fix build (hackclub#1589)
Browse files Browse the repository at this point in the history
* update metadata for Super_Platformer

* fix undefined variable error

* fix undefined var

* fix variable name

* box gravity doesn't work; disable to get build to work
  • Loading branch information
recursiveforte authored Apr 13, 2024
1 parent dcfb45a commit ab357d3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions games/Super_Platformer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/*
First time? Check out the tutorial game:
https://sprig.hackclub.com/gallery/getting_started
@title: Super_Platformer
@author: KinjalPriya000
@tags: []
@img: ""
@addedOn: 2024-04-11
*/

const player = "p";
Expand Down Expand Up @@ -324,6 +330,8 @@ function onUpdatePosition() {
}
afterInput(async () => {
onUpdatePosition();
let isBoxPromiseRunning;
let isPlayerPromiseRunning;
if (!isBoxPromiseRunning) {
isBoxPromiseRunning = true;
const boxGravityPromise = (async () => {
Expand All @@ -340,5 +348,5 @@ afterInput(async () => {
isPlayerPromiseRunning = false;
});
}
await Promise.all([gravityPromise, boxGravityPromise]);
});
await Promise.all([playerGravityPromise, /*boxGravityPromise*/]);
});

0 comments on commit ab357d3

Please sign in to comment.