/// ///////////////////////////////////////////////////////// /// Static /// ///////////////////////////////////////////////////////// // Cache velocity for fragments public IEnumerator DemolishableCor(RayfireRigid scr) { while (scr.demolitionType != DemolitionType.None) { // Max depth reached if (scr.limitations.depth > 0 && scr.limitations.currentDepth >= scr.limitations.depth) { scr.demolitionType = DemolitionType.None; } // Init demolition if (scr.limitations.demolitionShould == true) { scr.Demolish(); } // Check for slicing planes and init slicing else if (scr.limitations.sliceByBlade == true && scr.limitations.slicePlanes.Count > 1) { scr.Slice(); } yield return(null); } }