PhysicsServiceCollectionExtensions.AddPhysicsLayers(this IServiceCollection, Action) Method
Definition
Namespace: Brine2D.Physics
Registers named physics layers in the PhysicsLayerRegistry singleton and freezes the registry. Call this once during startup after AddPhysics\(this IServiceCollection, Action<PhysicsOptions>\).
C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddPhysicsLayers(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Brine2D.Physics.PhysicsLayerRegistry> configure);
Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
configure System.Action<PhysicsLayerRegistry>
Delegate to register layer names and their indices \(0–63\).
Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection