private bool LinearSlice(Pair2D slice) { if (sliceJoints) { Slicer2DJoints.LinearSliceJoints(slice); } List <Slice2D> results = Slicer2D.LinearSliceAll(slice, sliceLayer); bool result = false; foreach (Slice2D id in results) { if (id.GetGameObjects().Count > 0) { result = true; } eventHandler.Perform(id); } if (addForce == true) { foreach (Slice2D id in results) { Slicer2DAddForce.LinearSlice(id, addForceAmount); } } return(result); }
private void LinearSlice(Pair2D slice) { List <Slice2D> results = Slicer2D.LinearSliceAll(slice, null); if (addForce == false) { return; } // Adding Physics Forces foreach (Slice2D id in results) { Slicer2DAddForce.LinearSlice(id, addForceAmount); } }