class_visualscriptconstructor.rst 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the VisualScriptConstructor.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_VisualScriptConstructor:
  5. VisualScriptConstructor
  6. =======================
  7. **Inherits:** :ref:`VisualScriptNode<class_visualscriptnode>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A Visual Script node which calls a base type constructor.
  12. Member Functions
  13. ----------------
  14. +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`Dictionary<class_dictionary>` | :ref:`get_constructor<class_VisualScriptConstructor_get_constructor>` **(** **)** const |
  16. +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`get_constructor_type<class_VisualScriptConstructor_get_constructor_type>` **(** **)** const |
  18. +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`set_constructor<class_VisualScriptConstructor_set_constructor>` **(** :ref:`Dictionary<class_dictionary>` constructor **)** |
  20. +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_constructor_type<class_VisualScriptConstructor_set_constructor_type>` **(** :ref:`int<class_int>` type **)** |
  22. +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  23. Member Variables
  24. ----------------
  25. - :ref:`Dictionary<class_dictionary>` **constructor** - The constructor function's method info. Has roughly the following structure:
  26. [codeblock]
  27. {
  28. name = "string",
  29. args = [{
  30. name = "string"
  31. class_name = "string"
  32. type = TYPE_*
  33. hint = PROPERTY_HINT_*
  34. hint_string = "string"
  35. }]
  36. default_args = [] # Array of variants
  37. flags = METHOD_FLAG_*
  38. id = 0
  39. return = {type = TYPE_*}
  40. }
  41. [/codeblock]
  42. - :ref:`int<class_int>` **type** - The type to be constructed.
  43. Description
  44. -----------
  45. A Visual Script node which calls a base type constructor. It can be used for type conversion as well.
  46. Member Function Description
  47. ---------------------------
  48. .. _class_VisualScriptConstructor_get_constructor:
  49. - :ref:`Dictionary<class_dictionary>` **get_constructor** **(** **)** const
  50. .. _class_VisualScriptConstructor_get_constructor_type:
  51. - :ref:`int<class_int>` **get_constructor_type** **(** **)** const
  52. .. _class_VisualScriptConstructor_set_constructor:
  53. - void **set_constructor** **(** :ref:`Dictionary<class_dictionary>` constructor **)**
  54. .. _class_VisualScriptConstructor_set_constructor_type:
  55. - void **set_constructor_type** **(** :ref:`int<class_int>` type **)**