refactor: list pool initial count and capacity parameters added
This commit is contained in:
@@ -21,11 +21,11 @@ public class PhysicsEngine2DStandalone : IPhysicsEngine2D
|
||||
private readonly ICollisionResolver2D collisionResolver = null!;
|
||||
private readonly IRaycastResolver2D raycastResolver = null!;
|
||||
|
||||
private readonly ListPool<ICollider2D> colliderPool = new(() => new(32));
|
||||
private readonly ListPool<IPrePhysicsUpdate> prePhysicsUpdatePool = new(() => new(32));
|
||||
private readonly ListPool<IPhysicsUpdate> physicsUpdatePool = new(() => new(32));
|
||||
private readonly ListPool<IPhysicsIteration> physicsIterationPool = new(() => new(32));
|
||||
private readonly ListPool<IPostPhysicsUpdate> postPhysicsUpdatePool = new(() => new(32));
|
||||
private readonly ListPool<ICollider2D> colliderPool = new();
|
||||
private readonly ListPool<IPrePhysicsUpdate> prePhysicsUpdatePool = new();
|
||||
private readonly ListPool<IPhysicsUpdate> physicsUpdatePool = new();
|
||||
private readonly ListPool<IPhysicsIteration> physicsIterationPool = new();
|
||||
private readonly ListPool<IPostPhysicsUpdate> postPhysicsUpdatePool = new();
|
||||
|
||||
public int IterationPerStep { get => _iterationCount; set => _iterationCount = value < 1 ? 1 : value; }
|
||||
|
||||
|
Reference in New Issue
Block a user