示例#1
0
 public static void Deploy()
 {
     if (IsEnabled)
     {
         return;
     }
     IsEnabled = true;
     FakeWaterManager.Init();
     FakeDistrictManager.Init();
     FakeDistrictTool.Init();
     FakeImmaterialResourceManager.Init();
     FakeZoneManager.Init();
     FakeZoneTool.Init();
     FakeElectricityManager.Init();
     Redirect(false);
     FakeGameAreaManager.Init();
 }
示例#2
0
        private static IEnumerator UnlockAllCoroutine()
        {
            var instance = GameAreaManager.instance;

            for (var i = 0; i < FakeGameAreaManager.GRID; ++i)
            {
                for (var j = 0; j < FakeGameAreaManager.GRID; ++j)
                {
                    var i1 = i;
                    var j1 = j;
                    SimulationManager.instance.AddAction(() =>
                    {
                        try
                        {
                            if (instance.IsUnlocked(i1, j1))
                            {
                                return;
                            }
                            var areaIndex = FakeGameAreaManager.GetTileIndex(i1, j1);
                            //This method gets inlined and can't be detoured
                            CheatInProgress = true;
                            instance.UnlockArea(areaIndex);
                        }
                        catch (Exception e)
                        {
                            UnityEngine.Debug.LogException(e);
                        }
                        finally
                        {
                            CheatInProgress = false;
                        }
                    });
                    yield return(null);
                }
            }
        }