Skip to content

Commit

Permalink
Merge pull request #219 from SCCapstone/spencer-dev
Browse files Browse the repository at this point in the history
Gravity now resets to floor if switching levels while on the ceiling
  • Loading branch information
stbeaumont98 authored Apr 22, 2024
2 parents b0cfbfc + 71aa4ac commit 5b2be1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Assets/Scripts/PlayerMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ public class PlayerMovement : MonoBehaviour
[SerializeField] AudioSource reverseGrav;
[SerializeField] bool hasGravityController = true;


void Awake()
{
Physics2D.gravity = new Vector2(0.00f, -9.81f);
}

// Start is called before the first frame update
void Start()
{
Expand Down

0 comments on commit 5b2be1e

Please sign in to comment.