World2D.xml 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="World2D" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Class that has everything pertaining to a 2D world.
  5. </brief_description>
  6. <description>
  7. Class that has everything pertaining to a 2D world. A physics space, a visual scenario, a navigation map and a sound space. 2D nodes register their resources into the current 2D world.
  8. </description>
  9. <tutorials>
  10. <link>$DOCS_URL/tutorials/physics/ray-casting.html</link>
  11. </tutorials>
  12. <methods>
  13. </methods>
  14. <members>
  15. <member name="canvas" type="RID" setter="" getter="get_canvas">
  16. The [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing.
  17. </member>
  18. <member name="direct_space_state" type="Physics2DDirectSpaceState" setter="" getter="get_direct_space_state">
  19. Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to [code]_physics_process(delta)[/code] in the main thread.
  20. </member>
  21. <member name="navigation_map" type="RID" setter="" getter="get_navigation_map">
  22. The [RID] of this world's navigation map. Used by the [Navigation2DServer].
  23. </member>
  24. <member name="space" type="RID" setter="" getter="get_space">
  25. The [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area.
  26. </member>
  27. </members>
  28. <constants>
  29. </constants>
  30. </class>