Beispiel #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;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Runs a tick of the simulation.
 /// </summary>
 /// <param name="e">Current GameTiming.FrameTime</param>
 private void Update(FrameEventArgs e)
 {
     _networkManager.ProcessPackets();
     CluwneLib.RunIdle(this, e);
     AssemblyLoader.BroadcastUpdate(AssemblyLoader.UpdateLevel.PreEngine, e.Elapsed);
     _stateManager.Update(e);
     AssemblyLoader.BroadcastUpdate(AssemblyLoader.UpdateLevel.PostEngine, e.Elapsed);
 }
        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);
        }
        private void Update(FrameEventArgs frameEventArgs)
        {
            _networkManager.ProcessPackets();
            _modLoader.BroadcastUpdate(ModUpdateLevel.PreEngine, frameEventArgs);
            _timerManager.UpdateTimers(frameEventArgs);
            _taskManager.ProcessPendingTasks();
            _userInterfaceManager.Update(frameEventArgs);
            _stateManager.Update(frameEventArgs);

            if (_client.RunLevel >= ClientRunLevel.Connected)
            {
                _gameStateManager.ApplyGameState();
            }

            _modLoader.BroadcastUpdate(ModUpdateLevel.PostEngine, frameEventArgs);
        }
Beispiel #5
0
 private void Input(FrameEventArgs frameEventArgs)
 {
     _clyde.ProcessInput(frameEventArgs);
     _networkManager.ProcessPackets();
     _taskManager.ProcessPendingTasks(); // tasks like connect
 }
Beispiel #6
0
 /// <summary>
 /// Runs a tick of the simulation.
 /// </summary>
 /// <param name="e">Current GameTiming.FrameTime</param>
 private void Update(FrameEventArgs e)
 {
     _networkManager.ProcessPackets();
     CluwneLib.RunIdle(this, e);
     _stateManager.Update(e);
 }
Beispiel #7
0
 private void Input(FrameEventArgs frameEventArgs)
 {
     _clyde.ProcessInput(frameEventArgs);
     _networkManager.ProcessPackets();
 }