Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | GrandioseCoder |
Can I create a class constructor the same way Vector(0,0) does without using _init or new()?, for example MyClass(arg1, arg2). I have some classes that do not inherit from Node so I cannot use the method. new(), my question is, can I create class constructors like I would in other object-oriented programming languages, for example MyClass(arg1, arg2)? I have seen how the Vector class uses this method (var my_var = Vector(0,0)) but I don’t know how to implement it in my Script. Does anyone know how to do it?