- 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.
推薦閱讀
- Mastering Ember.js
- Scala Design Patterns
- iOS開發實戰:從零基礎到App Store上架
- 三維圖形化C++趣味編程
- Python編程:從入門到實踐
- Learning FuelPHP for Effective PHP Development
- 21天學通C++(第5版)
- Learning Ionic
- 會當凌絕頂:Java開發修行實錄
- Developing Java Applications with Spring and Spring Boot
- Java Web應用開發
- Opa Application Development
- Learning RxJava
- Learning Network Programming with Java
- 污染環境修復實踐與案例