Additions to GDScript styleguide

This commit is contained in:
Chris Bradfield 2017-10-22 17:58:36 -07:00
parent 4e9fd15746
commit 60b7284184
1 changed files with 17 additions and 1 deletions

View File

@ -162,7 +162,13 @@ ugly.
Classes and Nodes
~~~~~~~~~~~~~~~~~
Use CapWords, or PascalCase: ``extends KinematicBody``
Use PascalCase: ``extends KinematicBody``
Also when loading a class into a constant or variable:
::
const MyCoolNode = preload('res://my_cool_node.gd')
Functions and Variables
~~~~~~~~~~~~~~~~~~~~~~~
@ -173,6 +179,16 @@ Prepend a single underscore (\_) to virtual methods (functions the user
must override), private functions, and private variables:
``func _ready()``
Signals
~~~~~~~
Use past tense:
::
signal door_opened
signal score_changed
Constants
~~~~~~~~~