Exemplo n.º 1
0
        private static void PlaceClusters(
            DesertDescription description,
            DesertHive.ClusterGroup clusters)
        {
            Rectangle hive = description.Hive;

            hive.Inflate(20, 20);
            DesertHive.PostPlacementEffect[,] postEffectMap = new DesertHive.PostPlacementEffect[hive.Width, hive.Height];
            DesertHive.PlaceClustersArea(description, clusters, hive, postEffectMap, Point.Zero);
            for (int left = hive.Left; left < hive.Right; ++left)
            {
                for (int top = hive.Top; top < hive.Bottom; ++top)
                {
                    if (postEffectMap[left - hive.Left, top - hive.Top].HasFlag((Enum)DesertHive.PostPlacementEffect.Smooth))
                    {
                        Tile.SmoothSlope(left, top, false, false);
                    }
                }
            }
        }
Exemplo n.º 2
0
 public static void Place(DesertDescription description)
 {
     DesertHive.ClusterGroup clusters = DesertHive.ClusterGroup.FromDescription(description);
     DesertHive.PlaceClusters(description, clusters);
     DesertHive.AddTileVariance(description);
 }