예제 #1
0
        // -- Private Methods --

        /**
         * Returns an array of all the TileMaps object under a given node.
         */
        private static Generic.List <TileMap> FindTilemapsUnder(Node root)
        {
            // Prepare the return list.
            Generic.List <TileMap> output = new Generic.List <TileMap>();

            // Loop through all the children nodes.
            foreach (Node child in root.GetChildren())
            {
                // If the object is a TileMap.
                if (child is TileMap)
                {
                    // Add it to the result list.
                    output.Add(child as TileMap);
                }

                // If the object has any children.
                if (child.GetChildCount() > 0)
                {
                    // Add its sub-tilemaps to the list.
                    output.AddRange(FindTilemapsUnder(child));
                }
            }

            // Return the list.
            return(output);
        }
예제 #2
0
        // -- Operators --
        // -- Public Methods --

        /**
         * Merge a face into this one.
         */
        public void Merge(Face other)
        {
            // Add its points.
            Points.AddRange(other.Points);

            // Add its edges.
            foreach (Edge edge in other.Edges)
            {
                AddEdge(edge);
            }

            zone.Merge(other.zone);
        }