Exemple #1
0
 public override void PhysicsProcess(float delta)
 {
     // Can't be too certain.
     gameTiming.InSimulation = true;
     gameTiming._tickRemainderTimer.Restart();
     try
     {
         if (!gameTiming.Paused)
         {
             gameTiming.CurTick++;
             _networkManager.ProcessPackets();
             var eventArgs = new ProcessFrameEventArgs(delta);
             AssemblyLoader.BroadcastUpdate(AssemblyLoader.UpdateLevel.PreEngine, eventArgs.Elapsed);
             _timerManager.UpdateTimers(delta);
             _taskManager.ProcessPendingTasks();
             _userInterfaceManager.Update(eventArgs);
             _stateManager.Update(eventArgs);
             AssemblyLoader.BroadcastUpdate(AssemblyLoader.UpdateLevel.PostEngine, eventArgs.Elapsed);
         }
     }
     finally
     {
         gameTiming.InSimulation = false;
     }
 }
        private void Update(float frameTime)
        {
            var eventArgs = new ProcessFrameEventArgs(frameTime);

            _networkManager.ProcessPackets();
            AssemblyLoader.BroadcastUpdate(AssemblyLoader.UpdateLevel.PreEngine, eventArgs.Elapsed);
            _timerManager.UpdateTimers(frameTime);
            _taskManager.ProcessPendingTasks();
            _userInterfaceManager.Update(eventArgs);
            _stateManager.Update(eventArgs);
            AssemblyLoader.BroadcastUpdate(AssemblyLoader.UpdateLevel.PostEngine, eventArgs.Elapsed);
        }