예제 #1
0
        // 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);
            }
        }
예제 #2
0
 // Reset object
 public void ResetRigid()
 {
     RFReset.ResetRigid(this);
 }