Let's take a look at the Unity Scripting documentation and search for scripting reference for Rigidbody2D.AddForce. This is the way we will apply force to our character. Now we are going to add more code to PlayerController so it looks more or less like this:
Lots of new code! Let's go through each new line we have added.
Line 7 should be very easy for you to understand now. It declares the float type jumpForce variable. In lines 8 and 12, we will be controlling the character physics in the PlayerController script, so we need easy access to the RigidBody2D component on the same game object.
Have a look at the Scripting Reference for ...