+ 1

Gd script corse.

Exemple: # A file is a class! # Inheritance extends BaseClass # (optional) class definition with a custom icon class_name MyClass, "res://path/to/optional/icon.svg" # Member Variables var a = 5 var s = "Hello" var arr = [1, 2, 3] var dict = {"key": "value", 2:3} var typed_var: int var inferred_type := "String" # Constants const ANSWER = 42 const THE_NAME = "Charly" # Enums enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALLY} enum Named {THING_1, THING_2, ANOTHER_THING = -1} # Built-in Vector Types var v2 = Vector2(1, 2) var v3 = Vector3(1, 2, 3) # Function func some_function(param1, param2): var local_var = 5 if param1 < local_var: print(param1) elif param2 > 5: print(param2) else: print("Fail!") for i in range(20): print(i) while param2 != 0: param2 -= 1 var local_var2 = param1 + 3 return local_var2 # Functions override functions with the same name on the base/parent class. # If you still want to call them, use '.' (like 'super'

7th Dec 2019, 10:28 AM
Arydev
Arydev - avatar
3 Answers
+ 1
Please like my answer.
7th Dec 2019, 10:29 AM
Arydev
Arydev - avatar
+ 3
Why we would like your answer without any reason and what is your actual problem? Do you know what the mean of Q/A discussion?
7th Dec 2019, 11:13 AM
A͢J
A͢J - avatar
0
I posted it to learn gd script
16th Dec 2019, 8:54 AM
Arydev
Arydev - avatar