PhysicsBody2D.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="PhysicsBody2D" inherits="CollisionObject2D" version="3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Base class for all objects affected by physics in 2D space.
  5. </brief_description>
  6. <description>
  7. PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
  8. </description>
  9. <tutorials>
  10. <link>$DOCS_URL/tutorials/physics/physics_introduction.html</link>
  11. </tutorials>
  12. <methods>
  13. <method name="add_collision_exception_with">
  14. <return type="void" />
  15. <argument index="0" name="body" type="Node" />
  16. <description>
  17. Adds a body to the list of bodies that this body can't collide with.
  18. </description>
  19. </method>
  20. <method name="get_collision_exceptions">
  21. <return type="Array" />
  22. <description>
  23. Returns an array of nodes that were added as collision exceptions for this body.
  24. </description>
  25. </method>
  26. <method name="remove_collision_exception_with">
  27. <return type="void" />
  28. <argument index="0" name="body" type="Node" />
  29. <description>
  30. Removes a body from the list of bodies that this body can't collide with.
  31. </description>
  32. </method>
  33. </methods>
  34. <members>
  35. <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" overrides="CollisionObject2D" default="false" />
  36. <member name="layers" type="int" setter="_set_layers" getter="_get_layers">
  37. Both collision_layer and collision_mask. Returns collision_layer when accessed. Updates collision_layer and collision_mask when modified.
  38. </member>
  39. </members>
  40. <constants>
  41. </constants>
  42. </class>