コード例 #1
0
 public void Annihilate(PlaneAnnihilationOrder order)
 {
     if (!order.chunkClearing && grassland != null)
     {
         grassland.Annihilate(order.GetGrasslandOrder());
     }
     ClearSurface(order);
 }
コード例 #2
0
 public void ClearSurface(PlaneAnnihilationOrder order)
 {
     if (structures == null)
     {
         myPlane.NullifyExtensionLink(this);
         return;
     }
     else
     {
         if (structures.Count > 0)
         {
             Structure se;
             StructureAnnihilationOrder strOrder = order.GetStructuresOrder();
             for (int i = 0; i < structures.Count; i++)
             {
                 se = structures[i];
                 if (se != null)
                 {
                     se.Annihilate(strOrder);
                 }
             }
             structures = null;
         }
         if (order.recalculateSurface)
         {
             RecalculateSurface();
         }
         else
         {
             if (order.deleteExtensionLink)
             {
                 myPlane.NullifyExtensionLink(this);
             }
         }
         grassland?.Annihilate(order.GetGrasslandOrder());
     }
 }