Time for action – learning how a method works

We're going to edit LearningScript again. In the following screenshot, there are a few lines of code that look strange. We are not going to get into the details of what they mean in this chapter. We will discuss that in Chapter 4, Getting into the Details of Methods. Right now, I am just showing you a method's basic structure and how it works:

  1. In MonoDevelop, select LearningScript for editing.
  2. Edit the file so that it looks exactly like the following screenshot.
  3. Save the file.
Time for action – learning how a method works

What's in this script file?

In the previous screenshot, lines 6 and 7 will look familiar to you; they are variables just as you learned ...

Get Learning C# by Developing Games with Unity 3D Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.