public void Fracture() { if (destructible == null) { destructible = GetComponent <D2D_Destructible>(); } alphaTex = destructible.AlphaTex; width = alphaTex.width; height = alphaTex.height; total = width * height; D2D_SplitBuilder.BeginSplitting(destructible); { DoFracture(); } D2D_SplitBuilder.EndSplitting(D2D_SplitOrder.Default, Blur); }
private void BeginSplitting() { BusySplitting = true; alphaTex = destructible.AlphaTex; width = alphaTex.width; height = alphaTex.height; total = width * height; // Clear cells and set capacity cells.Clear(); if (cells.Capacity < total) { cells.Capacity = total; } D2D_SplitBuilder.BeginSplitting(destructible); }