Hey,
i would like to create a class like resource. For example:
SomeClass.gd:
extends Resource
var something: int = 1337
func _init() -> void:
pass
And another class like resource:
OtherClass.gd:
extends Resource
var some_class: SomeClass = SomeClass.new()
func _init() -> void:
print(some_class.something)
problem is in the second file. I cannot use SomeClass as a type. OtherClass doesn't know anything about SomeClass, so i understand the problem, but how can i introduce it?
The only thing i want is making classes which are not part of a node. I want to instantiate those classes in other scripts and i want to use typed parameters and variables. I know that i can load a resource with load or preload, an instantiate the class it, but i am not able to make the variables types explicit, like in var some_class: SomeClass