Unity Artificial Intelligence Programming
上QQ阅读APP看书,第一时间看更新

Conventions used

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 AdvanceFSM class basically manages all the FSMState(s) implemented, and keeps updated with the transitions and the current state."

A block of code is set as follows:

int throwDiceLoaded() { 
    Debug.Log("Throwing dice..."); 
      int randomProbability = Random.Range(1,101); 
      int diceResult = 0; 
      if (randomProbability < 36) { 
        diceResult = 6; 
      } 
      else { 
        diceResult = Random.Range(1,5); 
      } 
    Debug.Log("Result: " + diceResult); 
      return diceResult; 
  }

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Our Tank object is basically a simple Mesh with a Rigidbody component."

Warnings or important notes appear like this.
Tips and tricks appear like this.