Example #1
0
 /// <summary>
 /// Returns a resource to the pool.
 /// </summary>
 /// <param name="triangle">Triangle collidable to return.</param>
 public static void GiveBack(TriangleCollidable triangle)
 {
     if (SubPoolTriangleCollidables == null)
     {
         SubPoolTriangleCollidables = new UnsafeResourcePool <TriangleCollidable>();
     }
     triangle.CleanUp();
     SubPoolTriangleCollidables.GiveBack(triangle);
 }
 /// <summary>
 /// Cleans up the collidable.
 /// </summary>
 /// <param name="collidable">Collidable to clean up.</param>
 protected virtual void CleanUpCollidable(TriangleCollidable collidable)
 {
     PhysicsResources.GiveBack(collidable);
 }