mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Document coding convention
This commit is contained in:
parent
12f0ba6a64
commit
55c8ea497f
@ -117,6 +117,9 @@ Start reading our code and you'll get the hang of it. We optimize for readabilit
|
|||||||
\`NetworkIdentity identity\`, not \`NetworkIdentity uv\` or similar. If the variable needs a comment the name needs to be changed. For example, `msg = ... // the message` use `message = ...` without a comment instead
|
\`NetworkIdentity identity\`, not \`NetworkIdentity uv\` or similar. If the variable needs a comment the name needs to be changed. For example, `msg = ... // the message` use `message = ...` without a comment instead
|
||||||
* **type vs. var**:
|
* **type vs. var**:
|
||||||
Please use 'int x' instead of 'var x', etc. in all cases. Here is why: whenever
|
Please use 'int x' instead of 'var x', etc. in all cases. Here is why: whenever
|
||||||
|
* **private**
|
||||||
|
Fields and methods in a class are private by default, no need to use the private keyword there.
|
||||||
|
Note fields and methods are public by default in structs so it might be necessary there.
|
||||||
* This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible.
|
* This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible.
|
||||||
|
|
||||||
**One Python Way**
|
**One Python Way**
|
||||||
|
Loading…
Reference in New Issue
Block a user