- Learning C# by Developing Games with Unity 5.x(Second Edition)
- Greg Lukosek
- 116字
- 2021-07-09 20:03:35
Using multiword variable names
Let's use the same example again, as follows:
public bool areRoadConditionsPerfect = true;
You can see that the variable name is actually four words squeezed together. Since variable names can be only one word, begin the first word with a lowercase and then just capitalize the first letter of every additional word. This greatly helps create descriptive names which the viewer is still able to read. There's a term for this, called camel casing.
I have already mentioned that for public variables, Unity's Inspector will separate each word and capitalize the first word. Go ahead! Add the previous statement to LearningScript
and see what Unity does with it in the Inspector panel.
推薦閱讀
- 基于粒計算模型的圖像處理
- 少年輕松趣編程:用Scratch創作自己的小游戲
- Visual C++數字圖像模式識別技術詳解
- iOS開發實戰:從零基礎到App Store上架
- Programming ArcGIS 10.1 with Python Cookbook
- Redis Essentials
- Drupal 8 Module Development
- Java系統化項目開發教程
- Advanced UFT 12 for Test Engineers Cookbook
- Mastering Apache Camel
- Spring Data JPA從入門到精通
- Elasticsearch搜索引擎構建入門與實戰
- SaaS攻略:入門、實戰與進階
- Scala實用指南
- Unity AI Game Programming(Second Edition)