class_physicsserver2dmanager.rst 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicsServer2DManager.xml.
  6. .. _class_PhysicsServer2DManager:
  7. PhysicsServer2DManager
  8. ======================
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Manager for 2D physics server implementations.
  11. Description
  12. -----------
  13. ``PhysicsServer2DManager`` is the API for registering :ref:`PhysicsServer2D<class_PhysicsServer2D>` implementations, and for setting the default implementation.
  14. \ **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.
  15. Methods
  16. -------
  17. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`register_server<class_PhysicsServer2DManager_method_register_server>` **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` create_callback **)** |
  19. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_default_server<class_PhysicsServer2DManager_method_set_default_server>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` priority **)** |
  21. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. Method Descriptions
  23. -------------------
  24. .. _class_PhysicsServer2DManager_method_register_server:
  25. - void **register_server** **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` create_callback **)**
  26. 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.
  27. ----
  28. .. _class_PhysicsServer2DManager_method_set_default_server:
  29. - void **set_default_server** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` priority **)**
  30. 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.
  31. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  32. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  33. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  34. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  35. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  36. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`