title: How do I create a class for my player script in unity?
body: <pre><code>using UnityEngine;
  using System.Collections;
  
  public class PlayerController : MonoBehaviour
  {
  
  
      public float speed = 80.0f; // Code for how fast the ball can move. Also it will be public so we can change it inside of Unity itself. 
      private Rigidbody rb; // Variable that applies itself to Ball 
  
  
      // Code That enables our Player to move around. 
      void Movement()
      {
  
          float moveHorizontal = Input.GetAxis ("Horizontal");
          float moveVertical = Input.GetAxis ("Vertical");
          Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
          rb.AddForce (movement * speed);
      }
  
  
      // Update is called once per frame
      void Update ()
          {
              rb = GetComponent&lt;Rigidbody&gt; ();
              Movement ();
          }
  
  }
  </code></pre>