Esempio n. 1
0
        public override Component Copy()
        {
            var container = new ItemContainerComponent();

            foreach (var entity in _itemContainer)
            {
                container._itemContainer.Add(entity.Copy());
            }

            if (ItemAdded != null)
            {
                container.ItemAdded = (ComponentEventHandler <ItemContainerComponent, EventArgs <Entity> >)ItemAdded.Clone();
            }
            if (ItemRemoved != null)
            {
                container.ItemRemoved = (ComponentEventHandler <ItemContainerComponent, EventArgs <Entity> >)ItemRemoved.Clone();
            }


            return(container);
        }