Пример #1
0
        bool ComplexSlice(List <Vector2D> slice)
        {
            if (sliceJoints)
            {
                Slicer2DJoints.ComplexSliceJoints(slice);
            }

            List <Slice2D> results = Slicer2D.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)
                {
                    Slicer2DAddForce.ComplexSlice(id, addForceAmount);
                }
            }
            return(result);
        }
    private void ComplexSlice(List <Vector2D> slice)
    {
        List <Slice2D> results = Slicer2D.ComplexSliceAll(slice, null);

        if (addForce == false)
        {
            return;
        }

        foreach (Slice2D id in results)
        {
            Slicer2DAddForce.ComplexSlice(id, addForceAmount);
        }
    }