Ejemplo n.º 1
0
 public void Clear()
 {
     PolutionArea.ClearStatic();
     DeforestationArea.ClearStatic();
     DeforestationAreas.Clear();
     PolutionsWay.Clear();
 }
Ejemplo n.º 2
0
        public void StartPolutionWay(int ID, List <CellState> polutionTypes)
        {
            Cell refCell = EarthManager.Instance.Cells.Find(c => c.ID == ID);

            if (!refCell)
            {
                return;
            }

            if (PolutionArea.CELLS_USED.Contains(refCell))
            {
                refCell.ForcePolution(true);
            }

            PolutionArea area = PolutionsWay.Find(pa => pa.initialCell.ID == ID);

            if (area != null)
            {
                area.Start();
                return;
            }
            else
            {
                PolutionArea newWay = new PolutionArea(ID, polutionTypes);
                PolutionsWay.Add(newWay);
            }
        }