- 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.
- Implementing Modern DevOps
- Mastering JavaScript Functional Programming
- 數據庫程序員面試筆試真題與解析
- PyTorch自動駕駛視覺感知算法實戰
- Unity 2020 Mobile Game Development
- Windows Presentation Foundation Development Cookbook
- 軟件測試技術指南
- 焊接機器人系統操作、編程與維護
- SSM開發實戰教程(Spring+Spring MVC+MyBatis)
- Raspberry Pi Robotic Blueprints
- Vue.js應用測試
- Java 從入門到項目實踐(超值版)
- 數據分析與挖掘算法:Python實戰
- Professional JavaScript
- Django 2.0 入門與實踐