From f682a5885a6462df37aa55b6f3d098f9d6bc2f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Mon, 7 May 2018 20:14:42 +0200 Subject: [PATCH] Update gdscript cheatsheet.md --- cheatsheets/gdscript cheatsheet.md | 1 + 1 file changed, 1 insertion(+) diff --git a/cheatsheets/gdscript cheatsheet.md b/cheatsheets/gdscript cheatsheet.md index e76639a..9033e1e 100644 --- a/cheatsheets/gdscript cheatsheet.md +++ b/cheatsheets/gdscript cheatsheet.md @@ -14,6 +14,7 @@ Only the differences between the languages are mentioned. | built-in types | basic:
`bool`, `int`, `float`, `complex`, `str`
container:
`list`, `dict`, `tuple`, `set`, ... | basic:
`null`, `bool`, `int`, `float`, `String`
container:
`Array`, `Dictionary`, `PoolByteArray`, ...
vector:
`Vector2`, `Vector3`, `Rect2`, `Transform2D`,`Transform`, `Basis`, `Quat`, `AABB`
engine:
`Color`, `NodePath`, `RID`, `Object` | basic constants | `None`, `True`, `False` | `null`, `true`, `false` | | constructor name | `__init__` | `_init` +| module importing | `import` keyword | `preload` keyword | `self` variable | only in class functions, has to be an explicit argument (e.g. `__init__(self)`) | is always implicitly present (in non-static functions) | variable definition | `x = 5` | `var x = 5`
or to assign when the node is ready:
`onready var x = 5`
or to export to GUI interface and save:
`export var x = 5` | call superclass method | `super(SelfClass,self).method()` | `.method()` |