Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @tool # must be at the very top
- # comment
- ## documentation comment
- #code()
- extends Node2D
- class_name PascalCase # file name should be 'pascal_case.gd' (snake_case)
- ## Here you can do a description
- ## It's optional, with double hashes
- ##
- ## Im gonna take this moment to remind myself that Ctrl+R is Find&Replace
- ## Ctrl+Shift+F is Find&Replace through multiple files!
- ##
- ## Below are a couple tags
- ##
- ## @deprecated: use [another_class] instead
- ## @experimental: i'm unstable!
- # NOTE: The following keywords will be highlighted in comments :)
- # Critical (appears in red): ALERT, ATTENTION, CAUTION, CRITICAL, DANGER, SECURITY
- # Warning (appears in yellow): BUG, DEPRECATED, FIXME, HACK, TASK, TBD, TODO, WARNING
- # Notice (appears in green): INFO, NOTE, NOTICE, TEST, TESTING
- # signals right after class_name
- signal was_named # in the past tense
- enum {
- AFTER_SIGNALS,
- THEN_DEFINE,
- ENUMS_AND_CONSTANTS,
- IF_APPLICABLE,
- }
- const CAPS_WITH_UNDERSCORES = "good!"
- const PascalCaseAgain = preload("res://loading_class/into_const_or_var.gd")
- @export what_comes_next = "usually export variables, then public, then private, then @onready"
- var suitable_quotes = "double" # not 'single'
- var trailing_comma_example = [
- in_multi,
- line_lists,
- leave_comma,
- for_easy_refactor,
- ]
- space_between_operators_example = a * b + c
- var snake_case_variable_names = "yippie"
- var _private_variable = "leading underscore"
- @onready onready_var : String = what_comes_next
- func 2_spaces_before_func():
- if line_after_if:
- happy()
- if (
- long_if == true
- and good_formatting
- ):
- double_indent = true
- multiline = true
- func _override_me(): # also used for "private" functions
- pass # functions aren't actually private, but if they should be then _leading_underscore
- # actually also used for "notification" functions but they are generally builtin
- # stuff like _ready()
Advertisement
Add Comment
Please, Sign In to add comment