示例#1
0
            public void AfterDeserialize(DataSerializer s)
            {
                Singleton <LoadingManager> .instance.WaitUntilEssentialScenesLoaded();

                DistrictManager instance = Singleton <DistrictManager> .instance;

                District[]             buffer       = instance.m_districts.m_buffer;
                DistrictManager.Cell[] districtGrid = FakeDistrictManager.districtGrid;
                int num = districtGrid.Length;

                for (int i = 0; i < num; i++)
                {
                    DistrictManager.Cell cell         = districtGrid[i];
                    District[]           expr_60_cp_0 = buffer;
                    byte expr_60_cp_1 = cell.m_district1;
                    expr_60_cp_0[(int)expr_60_cp_1].m_totalAlpha = expr_60_cp_0[(int)expr_60_cp_1].m_totalAlpha + (uint)cell.m_alpha1;
                    District[] expr_80_cp_0 = buffer;
                    byte       expr_80_cp_1 = cell.m_district2;
                    expr_80_cp_0[(int)expr_80_cp_1].m_totalAlpha = expr_80_cp_0[(int)expr_80_cp_1].m_totalAlpha + (uint)cell.m_alpha2;
                    District[] expr_A0_cp_0 = buffer;
                    byte       expr_A0_cp_1 = cell.m_district3;
                    expr_A0_cp_0[(int)expr_A0_cp_1].m_totalAlpha = expr_A0_cp_0[(int)expr_A0_cp_1].m_totalAlpha + (uint)cell.m_alpha3;
                    District[] expr_C0_cp_0 = buffer;
                    byte       expr_C0_cp_1 = cell.m_district4;
                    expr_C0_cp_0[(int)expr_C0_cp_1].m_totalAlpha = expr_C0_cp_0[(int)expr_C0_cp_1].m_totalAlpha + (uint)cell.m_alpha4;
                }
                instance.m_districtCount = (int)(instance.m_districts.ItemCount() - 1u);
                instance.AreaModified(0, 0, 511, 511, true);
                instance.NamesModified();
            }