コード例 #1
0
        public void DoSingleTick()
        {
            List <Map> maps = Find.Maps;

            for (int i = 0; i < maps.Count; i++)
            {
                maps[i].MapPreTick();
            }
            if (!DebugSettings.fastEcology)
            {
                ticksGameInt++;
            }
            else
            {
                ticksGameInt += 2000;
            }
            Shader.SetGlobalFloat(ShaderPropertyIDs.GameSeconds, TicksGame.TicksToSeconds());
            tickListNormal.Tick();
            tickListRare.Tick();
            tickListLong.Tick();
            try
            {
                Find.DateNotifier.DateNotifierTick();
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString());
            }
            try
            {
                Find.Scenario.TickScenario();
            }
            catch (Exception ex2)
            {
                Log.Error(ex2.ToString());
            }
            try
            {
                Find.World.WorldTick();
            }
            catch (Exception ex3)
            {
                Log.Error(ex3.ToString());
            }
            try
            {
                Find.StoryWatcher.StoryWatcherTick();
            }
            catch (Exception ex4)
            {
                Log.Error(ex4.ToString());
            }
            try
            {
                Find.GameEnder.GameEndTick();
            }
            catch (Exception ex5)
            {
                Log.Error(ex5.ToString());
            }
            try
            {
                Find.Storyteller.StorytellerTick();
            }
            catch (Exception ex6)
            {
                Log.Error(ex6.ToString());
            }
            try
            {
                Current.Game.taleManager.TaleManagerTick();
            }
            catch (Exception ex7)
            {
                Log.Error(ex7.ToString());
            }
            try
            {
                Find.World.WorldPostTick();
            }
            catch (Exception ex8)
            {
                Log.Error(ex8.ToString());
            }
            for (int j = 0; j < maps.Count; j++)
            {
                maps[j].MapPostTick();
            }
            try
            {
                Find.History.HistoryTick();
            }
            catch (Exception ex9)
            {
                Log.Error(ex9.ToString());
            }
            GameComponentUtility.GameComponentTick();
            try
            {
                Find.LetterStack.LetterStackTick();
            }
            catch (Exception ex10)
            {
                Log.Error(ex10.ToString());
            }
            try
            {
                Find.Autosaver.AutosaverTick();
            }
            catch (Exception ex11)
            {
                Log.Error(ex11.ToString());
            }
            if (DebugViewSettings.logHourlyScreenshot && Find.TickManager.TicksGame >= lastAutoScreenshot + 2500)
            {
                ScreenshotTaker.QueueSilentScreenshot();
                lastAutoScreenshot = Find.TickManager.TicksGame / 2500 * 2500;
            }
            try
            {
                FilthMonitor.FilthMonitorTick();
            }
            catch (Exception ex12)
            {
                Log.Error(ex12.ToString());
            }
            UnityEngine.Debug.developerConsoleVisible = false;
        }
コード例 #2
0
        public void DoSingleTick()
        {
            List <Map> maps = Find.Maps;

            for (int i = 0; i < maps.Count; i++)
            {
                maps[i].MapPreTick();
            }
            if (!DebugSettings.fastEcology)
            {
                this.ticksGameInt++;
            }
            else
            {
                this.ticksGameInt += 250;
            }
            Shader.SetGlobalFloat(ShaderPropertyIDs.GameSeconds, this.TicksGame.TicksToSeconds());
            this.tickListNormal.Tick();
            this.tickListRare.Tick();
            this.tickListLong.Tick();
            try
            {
                Find.DateNotifier.DateNotifierTick();
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString());
            }
            try
            {
                Find.Scenario.TickScenario();
            }
            catch (Exception ex2)
            {
                Log.Error(ex2.ToString());
            }
            try
            {
                Find.World.WorldTick();
            }
            catch (Exception ex3)
            {
                Log.Error(ex3.ToString());
            }
            try
            {
                Find.StoryWatcher.StoryWatcherTick();
            }
            catch (Exception ex4)
            {
                Log.Error(ex4.ToString());
            }
            try
            {
                Find.GameEnder.GameEndTick();
            }
            catch (Exception ex5)
            {
                Log.Error(ex5.ToString());
            }
            try
            {
                Find.Storyteller.StorytellerTick();
            }
            catch (Exception ex6)
            {
                Log.Error(ex6.ToString());
            }
            try
            {
                Current.Game.taleManager.TaleManagerTick();
            }
            catch (Exception ex7)
            {
                Log.Error(ex7.ToString());
            }
            try
            {
                Find.World.WorldPostTick();
            }
            catch (Exception ex8)
            {
                Log.Error(ex8.ToString());
            }
            for (int j = 0; j < maps.Count; j++)
            {
                maps[j].MapPostTick();
            }
            try
            {
                Find.History.HistoryTick();
            }
            catch (Exception ex9)
            {
                Log.Error(ex9.ToString());
            }
            GameComponentUtility.GameComponentTick();
            try
            {
                Find.LetterStack.LetterStackTick();
            }
            catch (Exception ex10)
            {
                Log.Error(ex10.ToString());
            }
            try
            {
                Find.Autosaver.AutosaverTick();
            }
            catch (Exception ex11)
            {
                Log.Error(ex11.ToString());
            }
            Debug.developerConsoleVisible = false;
        }