Ejemplo n.º 1
0
        public void Simulate(float step)
        {
            bool flag = this.IsValid();

            if (flag)
            {
                bool flag2 = this == Physics.defaultPhysicsScene && Physics.autoSimulation;
                if (flag2)
                {
                    Debug.LogWarning("PhysicsScene.Simulate(...) was called but auto simulation is active. You should disable auto simulation first before calling this function therefore the simulation was not run.");
                }
                else
                {
                    Physics.Simulate_Internal(this, step);
                }
                return;
            }
            throw new InvalidOperationException("Cannot simulate the physics scene as it is invalid.");
        }