Skip to content

Commit

Permalink
Fixed a game bug and a bold description text whoopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
Auroriax committed Sep 11, 2019
1 parent 224e867 commit 0027fad
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
37 changes: 20 additions & 17 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,25 +407,28 @@ function step(framestep) {
}

//Update interface
i1.innerHTML = "Time: " +timeleft.toFixed(2).toString();
if (timeleft < 10)
if (state == 1)
{
i1.style.color = "#F08080";
} else {
i1.style.color = "white";
}
i1.innerHTML = "Time: " +timeleft.toFixed(2).toString();
if (timeleft < 10)
{
i1.style.color = "#F08080";
} else {
i1.style.color = "white";
}

if (level == 11)
{
i2.innerHTML = "All clear: +" +timejackpot.toString() + "";
var ypercent = (player.translate.y - (fliptop-c_yflipmargin)) / ((flipbottom + c_yflipmargin) - (fliptop - c_yflipmargin)) * 9.25; //9.45 instead of 10 so the number never gets rounded up to 10 in the interface
if (flipped == -1) {ypercent = (9.45-ypercent)}
ypercent = M.max(0,ypercent); //To avoid interface displaying -0 in some cases
i3.innerHTML = "Flips: " +score.toString() + "." + ypercent.toFixed(0).toString();
} else {
i2.innerHTML = activated.toString() + " of "+activategoal.toString();

i3.innerHTML = "Level:\n" +level.toString();
if (level == 11)
{
i2.innerHTML = "All clear: +" +timejackpot.toString() + "";
var ypercent = (player.translate.y - (fliptop-c_yflipmargin)) / ((flipbottom + c_yflipmargin) - (fliptop - c_yflipmargin)) * 9.25; //9.45 instead of 10 so the number never gets rounded up to 10 in the interface
if (flipped == -1) {ypercent = (9.45-ypercent)}
ypercent = M.max(0,ypercent); //To avoid interface displaying -0 in some cases
i3.innerHTML = "Flips: " +score.toString() + "." + ypercent.toFixed(0).toString();
} else {
i2.innerHTML = activated.toString() + " of "+activategoal.toString();

i3.innerHTML = "Level:\n" +level.toString();
}
}

if (paused && framestep == false) {return;}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "BackFlipped",
"description": "Fall to bottom to flip to the back, then fall back up on the other side... How long can you keep switching between the back and front of the stage? Game by <b>Tom Hermans (@Auroriax). Best played in Chrome or Firefox. \n\nHow to play (Arrow keys/WASD/ZQSD/Swipes):🡸 🡺: Flying kick, 🡹 🡻: Slow/fasten fall.\n Touched platforms move to background and increase score. Reach bottom of level to claim to the backside! You lose when time runs out... \n\nCoil subscribers get two extra color palettes! Or should I say... COILor palettes? Hah!",
"description": "Fall to bottom to flip to the back, then fall back up on the other side... How long can you keep switching between the back and front of the stage? Game by <b>Tom Hermans (@Auroriax)</b>. Best played in Chrome or Firefox. \n\nHow to play (Arrow keys/WASD/ZQSD/Swipes):🡸 🡺: Flying kick, 🡹 🡻: Slow/fasten fall.\n Touched platforms move to background and increase score. Reach bottom of level to claim to the backside! You lose when time runs out... \n\nCoil subscribers get two extra color palettes! Or should I say... COILor palettes? Hah!",
"images" : {
"image_large": "img/image-large.png",
"image_thumbnail": "img/image-small.png"
Expand Down

0 comments on commit 0027fad

Please sign in to comment.