예제 #1
0
        /// <summary>
        /// This will add a node to the collection.
        /// </summary>
        /// <param name="node">Specifies a node to be added.</param>
        /// <returns>Returns index of the newly added item.</returns>
        public int Add(TmxNode node)
        {
            if (this.parent != null)
            {
                node.SetParent(this.parent);
            }

            return(this.List.Add(node));
        }
예제 #2
0
        /// <summary>
        /// This will insert a node at the given position.
        /// </summary>
        /// <param name="index">The position at which to insert the node.</param>
        /// <param name="node">The node to insert.</param>
        public void Insert(int index, TmxNode node)
        {
            if (this.parent != null)
            {
                node.SetParent(this.parent);
            }

            this.InnerList.Insert(index, node);
        }
        /// <summary>
        /// This will insert a node at the given position.
        /// </summary>
        /// <param name="index">The position at which to insert the node.</param>
        /// <param name="node">The node to insert.</param>
        public void Insert(int index, TmxNode node)
        {
            if (this.parent != null)
            {
                node.SetParent(this.parent);
            }

            this.InnerList.Insert(index, node);
        }
        /// <summary>
        /// This will add a node to the collection.
        /// </summary>
        /// <param name="node">Specifies a node to be added.</param>
        /// <returns>Returns index of the newly added item.</returns>
        public int Add(TmxNode node)
        {
            if (this.parent != null)
            {
                node.SetParent(this.parent);
            }

            return this.List.Add(node);
        }