0.2.0-dev Download ZIP
26 lines ·1.5 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="World2D" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | A resource that holds all components of a 2D world, such as a canvas and a physics space. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | Class that has everything pertaining to a 2D world: A physics space, a canvas, and a sound space. 2D nodes register their resources into the current 2D world. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link> |
| 11 | </tutorials> |
| 12 | <members> |
| 13 | <member name="canvas" type="RID" setter="" getter="get_canvas"> |
| 14 | The [RID] of this world's canvas resource. Used by the [RenderingServer] for 2D drawing. |
| 15 | </member> |
| 16 | <member name="direct_space_state" type="PhysicsDirectSpaceState2D" setter="" getter="get_direct_space_state"> |
| 17 | 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 [method Node._physics_process] in the main thread. |
| 18 | </member> |
| 19 | <member name="navigation_map" type="RID" setter="" getter="get_navigation_map"> |
| 20 | The [RID] of this world's navigation map. Used by the [NavigationServer2D]. |
| 21 | </member> |
| 22 | <member name="space" type="RID" setter="" getter="get_space"> |
| 23 | The [RID] of this world's physics space resource. Used by the [PhysicsServer2D] for 2D physics, treating it as both a space and an area. |
| 24 | </member> |
| 25 | </members> |
| 26 | </class> |