PhysicsLayerRegistry.GetMask Method
Definition
Namespace: Brine2D.Physics
| Overloads | |
|---|---|
| GetMask\(string\) | Returns the category/collision bit mask for the given layer name. Equivalent to 1UL << GetLayer(name). |
| GetMask\(ReadOnlySpan<string>\) | Returns the combined mask for multiple named layers. Equivalent to OR-ing GetMask\(string\) for each name. |
PhysicsLayerRegistry.GetMask\(string\) Method
Returns the category/collision bit mask for the given layer name.
Equivalent to 1UL << GetLayer(name).
Parameters
name System.String
Returns
Exceptions
System.Collections.Generic.KeyNotFoundException
Thrown when the name has not been registered.
PhysicsLayerRegistry.GetMask\(ReadOnlySpan\<string\>\) Method
Returns the combined mask for multiple named layers. Equivalent to OR-ing GetMask\(string\) for each name.
Parameters
names System.ReadOnlySpan<System.String>
Returns
Exceptions
System.Collections.Generic.KeyNotFoundException
Thrown when any name has not been registered.