protected override void OnUpdate()
        {
            try
            {
                Profiler.BeginSample("GetMessages");
                worker.Tick();
                Profiler.EndSample();

                var diff = worker.Diff;

                Profiler.BeginSample("ApplyDiff ECS");
                ecsViewSystem.ApplyDiff(diff);
                Profiler.EndSample();

                Profiler.BeginSample("ApplyDiff Entity");
                entitySystem.ApplyDiff(diff);
                Profiler.EndSample();

                Profiler.BeginSample("ApplyDiff Networking Statistics");
                networkStatisticsSystem.ApplyDiff(diff);
                Profiler.EndSample();
            }
            catch (Exception e)
            {
                worker.LogDispatcher.HandleLog(LogType.Exception, new LogEvent("Exception:")
                                               .WithException(e));
            }
        }
Beispiel #2
0
        protected override void OnUpdate()
        {
            try
            {
                workerSystem.Tick();

                var diff = workerSystem.Diff;
                ecsViewSystem.ApplyDiff(diff);
                entitySystem.ApplyDiff(diff);
                networkStatisticsSystem.ApplyDiff(diff);
            }
            catch (Exception e)
            {
                workerSystem.LogDispatcher.HandleLog(LogType.Exception, new LogEvent("Exception:")
                                                     .WithException(e));
            }
        }