- Unity 3.x Game Development by Example Beginner's Guide
- Ryan Henson Creighton
- 270字
- 2021-04-02 18:34:11
It's all Greek to me
First, we created a JavaScript script. Unity scripts are written in three languages that are somewhat like English: JavaScript, C#, and Boo. You may have already dabbled in JavaScript if you've tried your hand at web development. Unity's version of JavaScript (called "UnityScript") is a bit different because it talks about Unity-related things and runs much faster than your father's JavaScript.
In this book, we'll use JavaScript because it's the simplest of the three languages to learn. For this reason, many of the online Unity scripting tutorials you'll find are also written in JavaScript.
Tip
Stay sharp
JavaScript may be the best learning language for Unity beginners, but if you end up getting serious about developing games with this software, consider learning C#. It's much closer to a "real" programming environment, and it gives you certain organizational advantages that you won't get with JavaScript.
The first thing that we did was to write a line of code between two curly braces. I like to think of curly braces as delicious sandwich buns that group code together. The single lines of code are like the thin layers of salami or tomato in the sandwich. Above the curly braces is the description, or declaration, of the sandwich. It's like saying: We are now going to make a hoagie—top sandwich bun, yummy ingredients, bottom sandwich bun.

In more technical, less sandwich terms, the area grouped by the buns is called a statement block. The layers between the buns are called statements. And the type of sandwich we're making, the Update sandwich, is known as a function.
- The Supervised Learning Workshop
- Java EE框架整合開發入門到實戰:Spring+Spring MVC+MyBatis(微課版)
- JavaScript+jQuery開發實戰
- Java網絡編程核心技術詳解(視頻微課版)
- CoffeeScript Application Development Cookbook
- JavaScript動態網頁編程
- UX Design for Mobile
- Ext JS 4 Plugin and Extension Development
- 金融商業數據分析:基于Python和SAS
- 分布式系統架構與開發:技術原理與面試題解析
- Learning Puppet
- Java EE互聯網輕量級框架整合開發:SSM+Redis+Spring微服務(上下冊)
- Netty 4核心原理與手寫RPC框架實戰
- Node.js核心技術教程
- Python輕松學:爬蟲、游戲與架站