예제 #1
0
        // Copy from
        public void CopyFrom(RayfireRigid scr)
        {
            // Copy to initial object: mesh root copy
            if (scr.objectType == ObjectType.MeshRoot)
            {
                action    = scr.reset.action;
                transform = scr.reset.transform;
                damage    = scr.reset.damage;
                mesh      = scr.reset.mesh;
                fragments = scr.reset.fragments;
            }

            // Copy to fragments
            else
            {
                // Fragments going to be reused by original object, should be deactivated
                action = scr.reset.fragments == FragmentsResetType.Reuse
                    ? PostDemolitionType.DeactivateToReset
                    : PostDemolitionType.DestroyWithDelay;

                transform = false;
                damage    = false;
                mesh      = MeshResetType.Destroy;
                fragments = FragmentsResetType.Destroy;
            }

            destroyDelay = scr.reset.destroyDelay;
        }
예제 #2
0
        /// /////////////////////////////////////////////////////////
        /// Constructor
        /// /////////////////////////////////////////////////////////

        // Constructor
        public RFReset()
        {
            action        = PostDemolitionType.DestroyWithDelay;
            destroyDelay  = 1;
            transform     = true;
            damage        = true;
            mesh          = MeshResetType.ReuseFragmentMeshes;
            fragments     = FragmentsResetType.Destroy;
            toBeDestroyed = false;
        }