Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "The audio.PlayOneShot command is perfect for collision sound effects."

A block of code is set as follows:

for(var i:int=0; i<totalRobots; i++)
{
  var aRobotParts:List.<String> = new List.<String>();

  aRobotParts.Add("Head");
  aRobotParts.Add("Arm");
  aRobotParts.Add("Leg");
}

When we wish to draw indicate that a line of code needs to be added or edited, the relevant lines or items are set in bold:

function Awake() 
{
  startTime = Time.time + 5.0;
}

New terms and important words are shown in bold. Words that you ...

Get Unity 4.x Game Development by Example 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.