class_area2d.rst 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Area2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Area2D:
  6. Area2D
  7. ======
  8. **Inherits:** :ref:`CollisionObject2D<class_CollisionObject2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. 2D area for detection and physics and audio influence.
  10. Description
  11. -----------
  12. 2D area that detects :ref:`CollisionObject2D<class_CollisionObject2D>` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/physics/using_area_2d`
  16. - `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__
  17. - `2D Pong Demo <https://godotengine.org/asset-library/asset/121>`__
  18. - `2D Platformer Demo <https://godotengine.org/asset-library/asset/120>`__
  19. Properties
  20. ----------
  21. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  22. | :ref:`float<class_float>` | :ref:`angular_damp<class_Area2D_property_angular_damp>` | ``1.0`` |
  23. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  24. | :ref:`StringName<class_StringName>` | :ref:`audio_bus_name<class_Area2D_property_audio_bus_name>` | ``&"Master"`` |
  25. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  26. | :ref:`bool<class_bool>` | :ref:`audio_bus_override<class_Area2D_property_audio_bus_override>` | ``false`` |
  27. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  28. | :ref:`float<class_float>` | :ref:`gravity<class_Area2D_property_gravity>` | ``980.0`` |
  29. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  30. | :ref:`float<class_float>` | :ref:`gravity_distance_scale<class_Area2D_property_gravity_distance_scale>` | ``0.0`` |
  31. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  32. | :ref:`bool<class_bool>` | :ref:`gravity_point<class_Area2D_property_gravity_point>` | ``false`` |
  33. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  34. | :ref:`Vector2<class_Vector2>` | :ref:`gravity_vec<class_Area2D_property_gravity_vec>` | ``Vector2(0, 1)`` |
  35. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  36. | :ref:`float<class_float>` | :ref:`linear_damp<class_Area2D_property_linear_damp>` | ``0.1`` |
  37. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  38. | :ref:`bool<class_bool>` | :ref:`monitorable<class_Area2D_property_monitorable>` | ``true`` |
  39. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  40. | :ref:`bool<class_bool>` | :ref:`monitoring<class_Area2D_property_monitoring>` | ``true`` |
  41. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  42. | :ref:`float<class_float>` | :ref:`priority<class_Area2D_property_priority>` | ``0.0`` |
  43. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  44. | :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` | :ref:`space_override<class_Area2D_property_space_override>` | ``0`` |
  45. +-------------------------------------------------+-----------------------------------------------------------------------------+-------------------+
  46. Methods
  47. -------
  48. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  49. | :ref:`Area2D[]<class_Area2D>` | :ref:`get_overlapping_areas<class_Area2D_method_get_overlapping_areas>` **(** **)** |const| |
  50. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  51. | :ref:`Node2D[]<class_Node2D>` | :ref:`get_overlapping_bodies<class_Area2D_method_get_overlapping_bodies>` **(** **)** |const| |
  52. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`overlaps_area<class_Area2D_method_overlaps_area>` **(** :ref:`Node<class_Node>` area **)** |const| |
  54. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`overlaps_body<class_Area2D_method_overlaps_body>` **(** :ref:`Node<class_Node>` body **)** |const| |
  56. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  57. Signals
  58. -------
  59. .. _class_Area2D_signal_area_entered:
  60. - **area_entered** **(** :ref:`Area2D<class_Area2D>` area **)**
  61. Emitted when another Area2D enters this Area2D. Requires :ref:`monitoring<class_Area2D_property_monitoring>` to be set to ``true``.
  62. ``area`` the other Area2D.
  63. ----
  64. .. _class_Area2D_signal_area_exited:
  65. - **area_exited** **(** :ref:`Area2D<class_Area2D>` area **)**
  66. Emitted when another Area2D exits this Area2D. Requires :ref:`monitoring<class_Area2D_property_monitoring>` to be set to ``true``.
  67. ``area`` the other Area2D.
  68. ----
  69. .. _class_Area2D_signal_area_shape_entered:
  70. - **area_shape_entered** **(** :ref:`RID<class_RID>` area_rid, :ref:`Area2D<class_Area2D>` area, :ref:`int<class_int>` area_shape, :ref:`int<class_int>` local_shape **)**
  71. Emitted when one of another Area2D's :ref:`Shape2D<class_Shape2D>`\ s enters one of this Area2D's :ref:`Shape2D<class_Shape2D>`\ s. Requires :ref:`monitoring<class_Area2D_property_monitoring>` to be set to ``true``.
  72. ``area_id`` the :ref:`RID<class_RID>` of the other Area2D's :ref:`CollisionObject2D<class_CollisionObject2D>` used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  73. ``area`` the other Area2D.
  74. ``area_shape`` the index of the :ref:`Shape2D<class_Shape2D>` of the other Area2D used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  75. ``local_shape`` the index of the :ref:`Shape2D<class_Shape2D>` of this Area2D used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  76. ----
  77. .. _class_Area2D_signal_area_shape_exited:
  78. - **area_shape_exited** **(** :ref:`RID<class_RID>` area_rid, :ref:`Area2D<class_Area2D>` area, :ref:`int<class_int>` area_shape, :ref:`int<class_int>` local_shape **)**
  79. Emitted when one of another Area2D's :ref:`Shape2D<class_Shape2D>`\ s exits one of this Area2D's :ref:`Shape2D<class_Shape2D>`\ s. Requires :ref:`monitoring<class_Area2D_property_monitoring>` to be set to ``true``.
  80. ``area_id`` the :ref:`RID<class_RID>` of the other Area2D's :ref:`CollisionObject2D<class_CollisionObject2D>` used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  81. ``area`` the other Area2D.
  82. ``area_shape`` the index of the :ref:`Shape2D<class_Shape2D>` of the other Area2D used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  83. ``local_shape`` the index of the :ref:`Shape2D<class_Shape2D>` of this Area2D used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  84. ----
  85. .. _class_Area2D_signal_body_entered:
  86. - **body_entered** **(** :ref:`Node2D<class_Node2D>` body **)**
  87. Emitted when a :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>` enters this Area2D. Requires :ref:`monitoring<class_Area2D_property_monitoring>` to be set to ``true``. :ref:`TileMap<class_TileMap>`\ s are detected if the :ref:`TileSet<class_TileSet>` has Collision :ref:`Shape2D<class_Shape2D>`\ s.
  88. ``body`` the :ref:`Node<class_Node>`, if it exists in the tree, of the other :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>`.
  89. ----
  90. .. _class_Area2D_signal_body_exited:
  91. - **body_exited** **(** :ref:`Node2D<class_Node2D>` body **)**
  92. Emitted when a :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>` exits this Area2D. Requires :ref:`monitoring<class_Area2D_property_monitoring>` to be set to ``true``. :ref:`TileMap<class_TileMap>`\ s are detected if the :ref:`TileSet<class_TileSet>` has Collision :ref:`Shape2D<class_Shape2D>`\ s.
  93. ``body`` the :ref:`Node<class_Node>`, if it exists in the tree, of the other :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>`.
  94. ----
  95. .. _class_Area2D_signal_body_shape_entered:
  96. - **body_shape_entered** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node2D<class_Node2D>` body, :ref:`int<class_int>` body_shape, :ref:`int<class_int>` local_shape **)**
  97. Emitted when one of a :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>`'s :ref:`Shape2D<class_Shape2D>`\ s enters one of this Area2D's :ref:`Shape2D<class_Shape2D>`\ s. Requires :ref:`monitoring<class_Area2D_property_monitoring>` to be set to ``true``. :ref:`TileMap<class_TileMap>`\ s are detected if the :ref:`TileSet<class_TileSet>` has Collision :ref:`Shape2D<class_Shape2D>`\ s.
  98. ``body_id`` the :ref:`RID<class_RID>` of the :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileSet<class_TileSet>`'s :ref:`CollisionObject2D<class_CollisionObject2D>` used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  99. ``body`` the :ref:`Node<class_Node>`, if it exists in the tree, of the :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>`.
  100. ``body_shape`` the index of the :ref:`Shape2D<class_Shape2D>` of the :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>` used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  101. ``local_shape`` the index of the :ref:`Shape2D<class_Shape2D>` of this Area2D used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  102. ----
  103. .. _class_Area2D_signal_body_shape_exited:
  104. - **body_shape_exited** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node2D<class_Node2D>` body, :ref:`int<class_int>` body_shape, :ref:`int<class_int>` local_shape **)**
  105. Emitted when one of a :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>`'s :ref:`Shape2D<class_Shape2D>`\ s exits one of this Area2D's :ref:`Shape2D<class_Shape2D>`\ s. Requires :ref:`monitoring<class_Area2D_property_monitoring>` to be set to ``true``. :ref:`TileMap<class_TileMap>`\ s are detected if the :ref:`TileSet<class_TileSet>` has Collision :ref:`Shape2D<class_Shape2D>`\ s.
  106. ``body_id`` the :ref:`RID<class_RID>` of the :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileSet<class_TileSet>`'s :ref:`CollisionObject2D<class_CollisionObject2D>` used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  107. ``body`` the :ref:`Node<class_Node>`, if it exists in the tree, of the :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>`.
  108. ``body_shape`` the index of the :ref:`Shape2D<class_Shape2D>` of the :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>` used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  109. ``local_shape`` the index of the :ref:`Shape2D<class_Shape2D>` of this Area2D used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`.
  110. Enumerations
  111. ------------
  112. .. _enum_Area2D_SpaceOverride:
  113. .. _class_Area2D_constant_SPACE_OVERRIDE_DISABLED:
  114. .. _class_Area2D_constant_SPACE_OVERRIDE_COMBINE:
  115. .. _class_Area2D_constant_SPACE_OVERRIDE_COMBINE_REPLACE:
  116. .. _class_Area2D_constant_SPACE_OVERRIDE_REPLACE:
  117. .. _class_Area2D_constant_SPACE_OVERRIDE_REPLACE_COMBINE:
  118. enum **SpaceOverride**:
  119. - **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping.
  120. - **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority<class_Area2D_property_priority>` order).
  121. - **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority<class_Area2D_property_priority>` order), ignoring any lower priority areas.
  122. - **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
  123. - **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in :ref:`priority<class_Area2D_property_priority>` order), but keeps calculating the rest of the areas.
  124. Property Descriptions
  125. ---------------------
  126. .. _class_Area2D_property_angular_damp:
  127. - :ref:`float<class_float>` **angular_damp**
  128. +-----------+-------------------------+
  129. | *Default* | ``1.0`` |
  130. +-----------+-------------------------+
  131. | *Setter* | set_angular_damp(value) |
  132. +-----------+-------------------------+
  133. | *Getter* | get_angular_damp() |
  134. +-----------+-------------------------+
  135. The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
  136. See :ref:`ProjectSettings.physics/2d/default_angular_damp<class_ProjectSettings_property_physics/2d/default_angular_damp>` for more details about damping.
  137. ----
  138. .. _class_Area2D_property_audio_bus_name:
  139. - :ref:`StringName<class_StringName>` **audio_bus_name**
  140. +-----------+---------------------------+
  141. | *Default* | ``&"Master"`` |
  142. +-----------+---------------------------+
  143. | *Setter* | set_audio_bus_name(value) |
  144. +-----------+---------------------------+
  145. | *Getter* | get_audio_bus_name() |
  146. +-----------+---------------------------+
  147. The name of the area's audio bus.
  148. ----
  149. .. _class_Area2D_property_audio_bus_override:
  150. - :ref:`bool<class_bool>` **audio_bus_override**
  151. +-----------+-------------------------------+
  152. | *Default* | ``false`` |
  153. +-----------+-------------------------------+
  154. | *Setter* | set_audio_bus_override(value) |
  155. +-----------+-------------------------------+
  156. | *Getter* | is_overriding_audio_bus() |
  157. +-----------+-------------------------------+
  158. If ``true``, the area's audio bus overrides the default audio bus.
  159. ----
  160. .. _class_Area2D_property_gravity:
  161. - :ref:`float<class_float>` **gravity**
  162. +-----------+--------------------+
  163. | *Default* | ``980.0`` |
  164. +-----------+--------------------+
  165. | *Setter* | set_gravity(value) |
  166. +-----------+--------------------+
  167. | *Getter* | get_gravity() |
  168. +-----------+--------------------+
  169. The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
  170. ----
  171. .. _class_Area2D_property_gravity_distance_scale:
  172. - :ref:`float<class_float>` **gravity_distance_scale**
  173. +-----------+-----------------------------------+
  174. | *Default* | ``0.0`` |
  175. +-----------+-----------------------------------+
  176. | *Setter* | set_gravity_distance_scale(value) |
  177. +-----------+-----------------------------------+
  178. | *Getter* | get_gravity_distance_scale() |
  179. +-----------+-----------------------------------+
  180. The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
  181. ----
  182. .. _class_Area2D_property_gravity_point:
  183. - :ref:`bool<class_bool>` **gravity_point**
  184. +-----------+-----------------------------+
  185. | *Default* | ``false`` |
  186. +-----------+-----------------------------+
  187. | *Setter* | set_gravity_is_point(value) |
  188. +-----------+-----------------------------+
  189. | *Getter* | is_gravity_a_point() |
  190. +-----------+-----------------------------+
  191. If ``true``, gravity is calculated from a point (set via :ref:`gravity_vec<class_Area2D_property_gravity_vec>`). See also :ref:`space_override<class_Area2D_property_space_override>`.
  192. ----
  193. .. _class_Area2D_property_gravity_vec:
  194. - :ref:`Vector2<class_Vector2>` **gravity_vec**
  195. +-----------+---------------------------+
  196. | *Default* | ``Vector2(0, 1)`` |
  197. +-----------+---------------------------+
  198. | *Setter* | set_gravity_vector(value) |
  199. +-----------+---------------------------+
  200. | *Getter* | get_gravity_vector() |
  201. +-----------+---------------------------+
  202. The area's gravity vector (not normalized). If gravity is a point (see :ref:`gravity_point<class_Area2D_property_gravity_point>`), this will be the point of attraction.
  203. ----
  204. .. _class_Area2D_property_linear_damp:
  205. - :ref:`float<class_float>` **linear_damp**
  206. +-----------+------------------------+
  207. | *Default* | ``0.1`` |
  208. +-----------+------------------------+
  209. | *Setter* | set_linear_damp(value) |
  210. +-----------+------------------------+
  211. | *Getter* | get_linear_damp() |
  212. +-----------+------------------------+
  213. The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
  214. See :ref:`ProjectSettings.physics/2d/default_linear_damp<class_ProjectSettings_property_physics/2d/default_linear_damp>` for more details about damping.
  215. ----
  216. .. _class_Area2D_property_monitorable:
  217. - :ref:`bool<class_bool>` **monitorable**
  218. +-----------+------------------------+
  219. | *Default* | ``true`` |
  220. +-----------+------------------------+
  221. | *Setter* | set_monitorable(value) |
  222. +-----------+------------------------+
  223. | *Getter* | is_monitorable() |
  224. +-----------+------------------------+
  225. If ``true``, other monitoring areas can detect this area.
  226. ----
  227. .. _class_Area2D_property_monitoring:
  228. - :ref:`bool<class_bool>` **monitoring**
  229. +-----------+-----------------------+
  230. | *Default* | ``true`` |
  231. +-----------+-----------------------+
  232. | *Setter* | set_monitoring(value) |
  233. +-----------+-----------------------+
  234. | *Getter* | is_monitoring() |
  235. +-----------+-----------------------+
  236. If ``true``, the area detects bodies or areas entering and exiting it.
  237. ----
  238. .. _class_Area2D_property_priority:
  239. - :ref:`float<class_float>` **priority**
  240. +-----------+---------------------+
  241. | *Default* | ``0.0`` |
  242. +-----------+---------------------+
  243. | *Setter* | set_priority(value) |
  244. +-----------+---------------------+
  245. | *Getter* | get_priority() |
  246. +-----------+---------------------+
  247. The area's priority. Higher priority areas are processed first.
  248. ----
  249. .. _class_Area2D_property_space_override:
  250. - :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` **space_override**
  251. +-----------+--------------------------------+
  252. | *Default* | ``0`` |
  253. +-----------+--------------------------------+
  254. | *Setter* | set_space_override_mode(value) |
  255. +-----------+--------------------------------+
  256. | *Getter* | get_space_override_mode() |
  257. +-----------+--------------------------------+
  258. Override mode for gravity and damping calculations within this area. See :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` for possible values.
  259. Method Descriptions
  260. -------------------
  261. .. _class_Area2D_method_get_overlapping_areas:
  262. - :ref:`Area2D[]<class_Area2D>` **get_overlapping_areas** **(** **)** |const|
  263. Returns a list of intersecting ``Area2D``\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
  264. ----
  265. .. _class_Area2D_method_get_overlapping_bodies:
  266. - :ref:`Node2D[]<class_Node2D>` **get_overlapping_bodies** **(** **)** |const|
  267. Returns a list of intersecting :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
  268. ----
  269. .. _class_Area2D_method_overlaps_area:
  270. - :ref:`bool<class_bool>` **overlaps_area** **(** :ref:`Node<class_Node>` area **)** |const|
  271. If ``true``, the given area overlaps the Area2D.
  272. **Note:** The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
  273. ----
  274. .. _class_Area2D_method_overlaps_body:
  275. - :ref:`bool<class_bool>` **overlaps_body** **(** :ref:`Node<class_Node>` body **)** |const|
  276. If ``true``, the given physics body overlaps the Area2D.
  277. **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
  278. The ``body`` argument can either be a :ref:`PhysicsBody2D<class_PhysicsBody2D>` or a :ref:`TileMap<class_TileMap>` instance (while TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body).
  279. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  280. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  281. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  282. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  283. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  284. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`