// Init broke restriction static void BrokeRestriction(RayfireRigid scr) { // Set state scr.restriction.broke = true; // Event scr.restrictionEvent.InvokeLocalEvent(scr); RFRestrictionEvent.InvokeGlobalEvent(scr); // Destroy/Deactivate if (scr.restriction.breakAction == RFBoundActionType.PostDemolitionAction) { RayfireMan.DestroyFragment(scr, scr.rootParent); } // Fade else if (scr.restriction.breakAction == RFBoundActionType.Fade) { RFFade.Fade(scr); } // Reset else if (scr.restriction.breakAction == RFBoundActionType.Reset) { RFReset.ResetRigid(scr); } }
// Fade this object public void Fade() { RFFade.Fade(this); }