- Building an FPS Game with Unity
- John P. Doran
- 279字
- 2021-07-09 21:09:45
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include
directive."
A block of code is set as follows:
void OnTriggerEnter(Collider other) { //If the player touches the trigger, and if it hasn't //been triggered before if(other.tag == "Player" && hasTriggered == false) { // Spawn a new enemy using the properties from the // spawnPoint object GameObject newEnemy = Instantiate(enemy, spawnPoint.position, spawnPoint.rotation) as GameObject; // We only want this to happen once. hasTriggered = true; } }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
void OnTriggerEnter(Collider other) { //If the player touches the trigger, and if it hasn't //been triggered before if(other.tag == "Player" && hasTriggered == false) { // Spawn a new enemy using the properties from the // spawnPoint object GameObject newEnemy = Instantiate(enemy, spawnPoint.position, spawnPoint.rotation) as GameObject; //Tell enemy to go to the player's position newEnemy.GetComponent<NavMeshAgent>().SetDestination(other.transform.position); // We only want this to happen once. hasTriggered = true; } }
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Once completed, select Create project."
- HTML5+CSS3+JavaScript從入門到精通:上冊(微課精編版·第2版)
- 密碼學原理與Java實現
- Android項目開發入門教程
- Visual Studio 2012 Cookbook
- NLTK基礎教程:用NLTK和Python庫構建機器學習應用
- Unity Virtual Reality Projects
- Web全棧工程師的自我修養
- PostgreSQL Replication(Second Edition)
- 編程數學
- 快人一步:系統性能提高之道
- C語言程序設計
- Swift 4 Protocol-Oriented Programming(Third Edition)
- Python Digital Forensics Cookbook
- Mastering PowerCLI
- Java RESTful Web Service實戰