Write Your Own Method

BallController holds three blocks of code now, and each one opens with the same word. You have typed void three times and nobody has said what it means. Those blocks are called methods. They are how C# gets split into pieces that run at different moments, and the next node has you write one of your own.

More in Make the Ball Move

  1. Understand Colliders
  2. Add a Kinematic Rigidbody
    1. Why Not Use Physics
  3. See What the Ball Touched
    1. Write Your Own Method
  4. Bounce Off the Walls
    1. Stop the Double Bounce

All 54 topics in the Your First Unity Game