- 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.
推薦閱讀
- 軟件安全技術(shù)
- PostgreSQL for Data Architects
- 征服RIA
- Spring核心技術(shù)和案例實戰(zhàn)
- Service Mesh實戰(zhàn):基于Linkerd和Kubernetes的微服務(wù)實踐
- Visual Studio 2015高級編程(第6版)
- Raspberry Pi Robotic Projects(Third Edition)
- Mastering Android Studio 3
- 黑莓(BlackBerry)開發(fā)從入門到精通
- 交互設(shè)計師成長手冊:從零開始學(xué)交互
- 零基礎(chǔ)學(xué)編程系列(全5冊)
- Jakarta EE Cookbook
- Android熱門應(yīng)用開發(fā)詳解
- MySQL數(shù)據(jù)庫教程(視頻指導(dǎo)版)
- Android項目實戰(zhàn):博學(xué)谷