コード例 #1
0
        public void AddVegetationCell()
        {
            PersistentVegetationCell persistentVegetationCell = new PersistentVegetationCell();

            PersistentVegetationCellList.Add(persistentVegetationCell);

            _instanceInfoDirty = true;
        }
コード例 #2
0
        void UpdatePersistentVegetationInstanceInfo()
        {
            PersistentVegetationInstanceInfoList.Clear();

            for (int i = 0; i <= PersistentVegetationCellList.Count - 1; i++)
            {
                PersistentVegetationCell cell = PersistentVegetationCellList[i];
                for (int j = 0; j <= cell.PersistentVegetationInfoList.Count - 1; j++)
                {
                    PersistentVegetationInstanceInfo instanceInfo =
                        GetPersistentVegetationInstanceInfo(cell.PersistentVegetationInfoList[j].VegetationItemID);
                    if (instanceInfo == null)
                    {
                        instanceInfo =
                            new PersistentVegetationInstanceInfo {
                            VegetationItemID = cell.PersistentVegetationInfoList[j].VegetationItemID
                        };
                        PersistentVegetationInstanceInfoList.Add(instanceInfo);
                    }
                    instanceInfo.Count += cell.PersistentVegetationInfoList[j].VegetationItemList.Count;
                    instanceInfo.AddSourceCountList(cell.PersistentVegetationInfoList[j].SourceCountList);
                }
            }
        }