GDScript.xml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="GDScript" inherits="Script" category="Core" version="3.0.alpha.custom_build">
  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. </tutorials>
  12. <demos>
  13. </demos>
  14. <methods>
  15. <method name="get_as_byte_code" qualifiers="const">
  16. <return type="PoolByteArray">
  17. </return>
  18. <description>
  19. Returns byte code for the script source code.
  20. </description>
  21. </method>
  22. <method name="new" qualifiers="vararg">
  23. <return type="Object">
  24. </return>
  25. <description>
  26. Returns a new instance of the script.
  27. For example:
  28. [codeblock]
  29. var MyClass = load("myclass.gd")
  30. var instance = MyClass.new()
  31. assert(instance.get_script() == MyClass)
  32. [/codeblock]
  33. </description>
  34. </method>
  35. </methods>
  36. <constants>
  37. </constants>
  38. </class>