


- Add “Box Collider” to “Ground”

- Add “Box Collider” to “Player”
- Add “RigidBody2D” to “Player”



- Claim variable for Player movement
- playerSpeed
- facingRight as flag
- playerJumpPower
- movementX
- in “Update()” method
- get input to move horizontally by using “Input.GetAxis()”
- get “RigidBody2D” component by using “GetComponent()”
- call “velocity” propery to move “Player” with continuous input
- create “if Statement” for Player’s movment
- when pressing left and facing right
- activate “FlipPlayer()” method
- when pressing right and facing left
- activate “FlipPlayer()” method
- when pressing left and facing right
- Create a Function, “FlipPlayer()”,
- set the flag, “facingRight” to opposite
- get the “localScale” property
- multiply -1 to reverse the direction
- Don’t forget to update “localScale”


- Create a function, “Jump()’,
- use “AddForce()” to give force upwards to “Player”
- in “PlayerMove()” method,
- when “Jump” button is pressed, activate “Jump()” method



- Set “Linear Drag” 0 to 1 to prevent “Player” from jumping too much
- Set “Gravity Scale” 0 to 10 to prevent “Player” from jumping too much

- Player jumps normally but still it can jump multiple times in the air









