- Unity 2017 Mobile Game Development
- John P. Doran
- 180字
- 2021-07-02 22:27:44
Improving our scripts with attributes and XML comments
We could stop working with the PlayerBehaviour class script here, but I want to touch on a couple of things that we can use in order to improve the quality and style of our code. This becomes especially useful when you start building projects in teams, as you'll be working with other people--some of them will be working on code with you, and then there are designers and artists who will not be working on code with you, but will still need to use the things that you've programmed.
When writing scripts, we want them to be as error-proof as possible. Making the rb variable private starts that process, as now the user will not be able to modify that anywhere outside of this class. We want our teammates to modify dodgeSpeed and rollSpeed, but we may want to give them some advice as to what it is and/or how it will be used. To do this in the Inspector window, we can make use of something called an attribute.
- Visual C++串口通信開發入門與編程實踐
- Architecting the Industrial Internet
- Apache Mesos Essentials
- 精通Python設計模式(第2版)
- Spring Boot企業級項目開發實戰
- Python Data Analysis Cookbook
- 程序設計基礎教程:C語言
- WordPress 4.0 Site Blueprints(Second Edition)
- Serverless computing in Azure with .NET
- 領域驅動設計:軟件核心復雜性應對之道(修訂版)
- 蘋果的產品設計之道:創建優秀產品、服務和用戶體驗的七個原則
- Oracle GoldenGate 12c Implementer's Guide
- Python全棧開發:基礎入門
- 官方 Scratch 3.0 編程趣味卡:讓孩子們愛上編程(全彩)
- Mastering Linux Kernel Development