Browse Source

Document braces and newline

master
Christopher 8 years ago
parent
commit
126e38292a
  1. 9
      Docs/fungus_docs/coding_standard.md

9
Docs/fungus_docs/coding_standard.md

@ -23,10 +23,10 @@ namespace Fungus
protected virtual void MyMethod() protected virtual void MyMethod()
{ {
if (myProperty > 5f) if (myProperty > 5f)
{ {
Debug.Log("A message"); Debug.Log("A message");
} }
} }
#region Public members #region Public members
@ -61,6 +61,7 @@ Things to note:
- All serialized fields should have a Tooltip attribute. This doubles as code documentation for the field. - All serialized fields should have a Tooltip attribute. This doubles as code documentation for the field.
- All methods should be declared virtual and use protected instead of private. This allows for easy inheritance and extension (at the cost of some performance). - All methods should be declared virtual and use protected instead of private. This allows for easy inheritance and extension (at the cost of some performance).
- All public members of a class (including public static & delegate types) should be placed inside a 'Public members' region for easy access. - All public members of a class (including public static & delegate types) should be placed inside a 'Public members' region for easy access.
- Braces go on a newline and use spaces exclusively instead of tabs.
# Coding best practices # {#coding_best_practices} # Coding best practices # {#coding_best_practices}

Loading…
Cancel
Save