Files
godot-docs/classes/class_physicsserver2dmanager.rst
2022-09-09 15:22:52 +02:00

56 lines
3.2 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicsServer2DManager.xml.
.. _class_PhysicsServer2DManager:
PhysicsServer2DManager
======================
**Inherits:** :ref:`Object<class_Object>`
Manager for 2D physics server implementations.
Description
-----------
``PhysicsServer2DManager`` is the API for registering :ref:`PhysicsServer2D<class_PhysicsServer2D>` implementations, and for setting the default implementation.
\ **Note:** It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions.
Methods
-------
+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`register_server<class_PhysicsServer2DManager_method_register_server>` **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` create_callback **)** |
+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_server<class_PhysicsServer2DManager_method_set_default_server>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` priority **)** |
+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Method Descriptions
-------------------
.. _class_PhysicsServer2DManager_method_register_server:
- void **register_server** **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` create_callback **)**
Register a :ref:`PhysicsServer2D<class_PhysicsServer2D>` implementation by passing a ``name`` and a :ref:`Callable<class_Callable>` that returns a :ref:`PhysicsServer2D<class_PhysicsServer2D>` object.
----
.. _class_PhysicsServer2DManager_method_set_default_server:
- void **set_default_server** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` priority **)**
Set the default :ref:`PhysicsServer2D<class_PhysicsServer2D>` implementation to the one identified by ``name``, if ``priority`` is greater than the priority of the current default implementation.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`