GDScript.xml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="GDScript" inherits="Script" category="Core" version="3.1.2">
  3. <brief_description>
  4. A script implemented in the GDScript programming language.
  5. </brief_description>
  6. <description>
  7. A script implemented in the GDScript programming language. The script exends the functionality of all objects that instance it.
  8. [method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
  9. </description>
  10. <tutorials>
  11. <link>https://docs.godotengine.org/en/3.1/getting_started/scripting/gdscript/index.html</link>
  12. </tutorials>
  13. <methods>
  14. <method name="get_as_byte_code" qualifiers="const">
  15. <return type="PoolByteArray">
  16. </return>
  17. <description>
  18. Returns byte code for the script source code.
  19. </description>
  20. </method>
  21. <method name="new" qualifiers="vararg">
  22. <return type="Object">
  23. </return>
  24. <description>
  25. Returns a new instance of the script.
  26. For example:
  27. [codeblock]
  28. var MyClass = load("myclass.gd")
  29. var instance = MyClass.new()
  30. assert(instance.get_script() == MyClass)
  31. [/codeblock]
  32. </description>
  33. </method>
  34. </methods>
  35. <constants>
  36. </constants>
  37. </class>