PhysicsSystem2DManager
Inherits: Object
Description
Section titled “Description”A singleton for managing PhysicsSystem2D implementations.
PhysicsSystem2DManager is the API for registering PhysicsSystem2D 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 Orblit itself and possibly by NativeExtensions.
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| void | register_system(name: String, create_callback: Callable) |
| void | set_default_system(name: String, priority: int) |
Method descriptions
Section titled “Method descriptions”register_system
void register_system(name: String, create_callback: Callable)
Register a PhysicsSystem2D implementation by passing a name and a Callable that returns a PhysicsSystem2D object.
set_default_system
void set_default_system(name: String, priority: int)
Set the default PhysicsSystem2D implementation to the one identified by name, if priority is greater than the priority of the current default implementation.
