Esempio n. 1
0
 public void Set(Rigidbody rigidbody)
 {
     settings = new RigidbodySettings(rigidbody);
 }
Esempio n. 2
0
        public static void PauseAll()
        {
            Rigidbody[] allRb = GameObject.FindObjectsOfType<Rigidbody>();
            pausedRigidBodies = new RigidbodySettings[allRb.Length];
            for (int i = 0; i < allRb.Length; i++)
            {
                if (allRb != null)
                {
                    pausedRigidBodies[i] = new RigidbodySettings(allRb[i]);
                    Pause(allRb[i]);
                }
            }

            Rigidbody2D[] allRb2D = GameObject.FindObjectsOfType<Rigidbody2D>();
            pausedRigidBodies2D = new Rigidbody2DSettings[allRb2D.Length];
            for (int i = 0; i < allRb2D.Length; i++)
            {
                if (allRb != null)
                {
                    pausedRigidBodies2D[i] = new Rigidbody2DSettings(allRb2D[i]);
                    Pause(allRb2D[i]);
                }
            }
        }