Skip to content

Commit

Permalink
Increased jump height and upgraded random face falling
Browse files Browse the repository at this point in the history
  • Loading branch information
willmil11 committed Nov 30, 2022
1 parent 3e21e53 commit 69f953f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function ResetObjects() {
RotateCooldown = false;
Cooldown = true;
Player.rotate();
while (Player.pos.y > (Player.ground - 130)) {
while (Player.pos.y > (Player.ground - 135)) {
Player.pos.y = Player.pos.y - 4;
RotateCooldown = true;
Render();
Expand Down Expand Up @@ -235,7 +235,7 @@ var Player = {
RotateCooldown = false;
Cooldown = true;
Player.rotate();
while (Player.pos.y > (Player.ground - 130)) {
while (Player.pos.y > (Player.ground - 135)) {
Player.pos.y = Player.pos.y - 4;
RotateCooldown = true;
Render();
Expand All @@ -251,14 +251,15 @@ var Player = {
}
RotateCooldown = true;
//Random square rotation at end of jump animation
var random = Math.floor(Math.random() * 4)
var random = Math.floor(Math.random() * 4);
if (Player.lastrandom === undefined){
Player.lastrandom = random;
}
else{
while (random === Player.lastrandom){
random = Math.floor(Math.random() * 4)
}
Player.lastrandom = random;
}
if (random === 1){
Player.pos.rotation = 0;
Expand Down

0 comments on commit 69f953f

Please sign in to comment.