123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/PhysicsServer2DManager.xml.
- .. _class_PhysicsServer2DManager:
- PhysicsServer2DManager
- ======================
- **Inherits:** :ref:`Object<class_Object>`
- Manager for 2D physics server implementations.
- .. rst-class:: classref-introduction-group
- 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.
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 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 **)** |
- +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_PhysicsServer2DManager_method_register_server:
- .. rst-class:: classref-method
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicsServer2DManager_method_set_default_server:
- .. rst-class:: classref-method
- 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.)`
|