diff --git a/script/demo02_base/MyClass.gd b/script/demo02_base/MyClass.gd index b147d69..d6352bb 100644 --- a/script/demo02_base/MyClass.gd +++ b/script/demo02_base/MyClass.gd @@ -1,6 +1,6 @@ # extends Node2D -var StringUtils = load("res://util/StringUtils.gd") +const StringUtils = preload("res://util/StringUtils.gd") # (optional) class definition with a custom icon class_name MyClass, "res://icon.png" diff --git a/util/RandomUtils.gd b/util/RandomUtils.gd new file mode 100644 index 0000000..d1d0c67 --- /dev/null +++ b/util/RandomUtils.gd @@ -0,0 +1,8 @@ +extends Object + + +const random = [null, false] + +static func init(): + random[0] = RandomNumberGenerator.new() +