Update() 공개 메소드

Performs a single timestep.
public Update ( ) : void
리턴 void
예제 #1
0
    public override void XUpdate()
    {
        //UnityEngine.Profiling.Profiler.BeginSample("BEPUPhysics - Update");
        _physicsSpace.Update(Time.deltaTime);

        for (int i = 0; i < nonMonoPhysics.Count; i++)
        {
            nonMonoPhysics [i].XPhysicsUpdate();
        }

        for (int i = 0; i < dynamicColliders.Count; i++)
        {
            dynamicColliders [i].XPhysicsUpdate();
        }

        //UnityEngine.Profiling.Profiler.EndSample();
    }
        double RunTest(IParallelLooper threadManager, Func<Space, int> simulationBuilder)
        {

            Space space = new Space(threadManager);

            var timeStepCount = simulationBuilder(space);


            //Perform one starter frame to warm things up.
            space.Update();

            var startTime = Stopwatch.GetTimestamp() / (double)Stopwatch.Frequency;
            for (int i = 0; i < timeStepCount; i++)
            {
                space.Update();
            }
            var endTime = Stopwatch.GetTimestamp() / (double)Stopwatch.Frequency;
            return endTime - startTime;
        }
예제 #3
0
 // Update is called once per frame
 void Update()
 {
     world.Update();
 }