예제 #1
0
        /// <summary>
        /// Copies the Item
        /// </summary>
        /// <returns>A copy of the item</returns>
        public override Item Copy()
        {
            Technique item = new Technique();

            copyAttributes(item);
            return(item);
        }
예제 #2
0
        /// <summary>
        /// Copies all attributes of the Item into the passed in Item
        /// </summary>
        /// <param name="item">The Item to copy to</param>
        protected override void copyAttributes(Item item)
        {
            if (!(item is Technique))
            {
                throw new Exception("Item passed into copyAttributes does not match type!");
            }

            base.copyAttributes(item);
            Technique tech = item as Technique;

            tech.TechType    = TechType;
            tech.Level       = Level;
            tech.RequiredMST = RequiredMST;
        }