Esempio n. 1
0
        protected override void GameSystemsUpdate(bool updatePhysicsSimulation, bool updateSingleCallSystems)
        {
            // Don't use GameSystems.Update(updateTime), because we use different GameTimes depending on
            // what we're trying to update.
            _debugTextSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);
            //_vrDeviceSystem.TryUpdate(SingleCallSystemsGameTime, updateSingleCallSystems);
            _inputSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);

            _networkSystem.UpdateIfEnabled(UpdateTime);

            _scenePreUpdateSystem.UpdateIfEnabled(UpdateTime);  // Must occur before the physics & scripts

            if (updatePhysicsSimulation)
            {
                _physicsSystem.UpdateIfEnabled(PhysicsGameTime);
#if DEBUG
                //System.Diagnostics.Debug.WriteLine($"GameTime: {UpdateTime.Total.TotalMilliseconds} - PhysTime: {physicsGameTime.Total.TotalMilliseconds}");
#endif
            }
            // Scripts are run before everything (except physics)
            _scriptSystem.UpdateIfEnabled(UpdateTime);

            _streamingManager.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);
            _audioSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);
            _gameFontSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);
            _effectSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);
            _spriteAnimationSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);
            _uiSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);

            //_dynamicNavigationMeshSystem.TryUpdate(SingleCallSystemsGameTime, updateSingleCallSystems);

            _sceneSystem.UpdateIfEnabled(UpdateTime);   // This runs all the standard entity processors
            _scenePostUpdateSystem.UpdateIfEnabled(UpdateTime);

            _profilingSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);
        }
Esempio n. 2
0
        protected override void GameSystemsUpdate(bool updatePhysicsSimulation, bool updateSingleCallSystems)
        {
            _networkSystem.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);

            _scenePreUpdateSystem.UpdateIfEnabled(UpdateTime);

            if (updatePhysicsSimulation)
            {
                _physicsSystem.UpdateIfEnabled(PhysicsGameTime);
#if DEBUG
                //System.Diagnostics.Debug.WriteLine($"GameTime: {UpdateTime.Total.TotalMilliseconds} - PhysTime: {physicsGameTime.Total.TotalMilliseconds}");
#endif
            }

#if DEBUG
            //System.Diagnostics.Debug.WriteLine(@$"Time: {GameClockManager.SimulationClock.TotalTime:hh\:mm\:ss\.ff} - TickNo: {GameClockManager.SimulationClock.SimulationTickNumber}");
#endif
            //_scriptSystem.TryUpdate(UpdateTime);
            _streamingManager.UpdateIfEnabled(SingleCallSystemsGameTime, updateSingleCallSystems);

            _sceneSystem.UpdateIfEnabled(UpdateTime);   // This runs all the standard entity processors
            _scenePostUpdateSystem.UpdateIfEnabled(UpdateTime);
            //_dynamicNavigationMeshSystem.TryUpdate(SingleCallSystemsGameTime, updateSingleCallSystems);
        }