Skip to content

Commit

Permalink
fixed jump bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcollishaw committed Apr 26, 2023
1 parent 1d093da commit a57a2f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
5 changes: 0 additions & 5 deletions Assets/Scripts/Movement/PlayerMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,14 @@ void Update()
{
if(movementEnabled)
{
UpdateJumpSound();
bool checkOnGround = OnGround();

// Takes current input direction vector values [-1, 1];
x = Input.GetAxisRaw("Horizontal");
z = Input.GetAxisRaw("Vertical");

if (Input.GetButtonDown("Jump"))
{
UpdateJumpSound();

bool checkOnGround = OnGround();
Debug.Log("Is on ground: " + checkOnGround);

if (OnGround())
{
Expand Down
24 changes: 12 additions & 12 deletions Assets/save.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"LevelsUnlocked": {
"Level_Final": false,
"Level_4": false,
"Level_7": false,
"Level_1": true,
"Level_6": false,
"Level_5": false,
"Level_3": false,
"Tutorial Level": true,
"Level_2": false
}
{
"LevelsUnlocked": {
"Level_Final": false,
"Level_4": false,
"Level_7": false,
"Level_1": true,
"Level_6": false,
"Level_5": false,
"Level_3": false,
"Tutorial Level": true,
"Level_2": false
}
}

0 comments on commit a57a2f0

Please sign in to comment.