Skip to content

PhysicsSystem2DManager

Inherits: Object

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.

Returns Method
void register_system(name: String, create_callback: Callable)
void set_default_system(name: String, priority: int)

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.