private bool ComplexSlice(List <Vector2D> slice) { if (sliceJoints) { ComplexSliceJoints(slice); } List <Slice2D> results = Slicer2D.ComplexSliceAll(slice, sliceLayer); bool result = false; foreach (Slice2D id in results) { if (id.gameObjects.Count > 0) { result = true; } if (sliceResultEvent != null) { sliceResultEvent(id); } } if (addForce == true) { foreach (Slice2D id in results) { AddForce.ComplexSlice(id, addForceAmount); } } return(result); }
bool ComplexSlice(List <Vector2D> slice) { if (sliceJoints) { Slicer2D.Controller.Joints.ComplexSliceJoints(slice); } List <Slice2D> results = Slicing.ComplexSliceAll(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) { AddForce.ComplexSlice(id, addForceAmount); } } return(result); }