public AnimationLayerHolder Copy() { AnimationLayerHolder NewAnimationLayerHolder = new AnimationLayerHolder(); NewAnimationLayerHolder.ListAnimationLayer = new List <AnimationLayer>(ListAnimationLayer.Count); foreach (AnimationLayer ActiveLayer in ListAnimationLayer) { NewAnimationLayerHolder.ListAnimationLayer.Add(ActiveLayer.Copy()); } NewAnimationLayerHolder.GameEngineLayer = (GameEngineLayer)GameEngineLayer.Copy(); return(NewAnimationLayerHolder); }
protected void UpdateFrom(AnimationLayer Other) { _Name = Other._Name; Owner = Other.Owner; ListChildren = new List <AnimationLayer>(Other.ListChildren.Count); foreach (AnimationLayer ActiveLayer in Other.ListChildren) { ListChildren.Add(ActiveLayer.Copy()); } DicTimelineEvent = new Dictionary <int, List <Timeline> >(Other.DicTimelineEvent.Count); foreach (KeyValuePair <int, List <Timeline> > ActiveListTimelineEvent in Other.DicTimelineEvent) { List <Timeline> ListTimelineEvent = new List <Timeline>(ActiveListTimelineEvent.Value.Count); foreach (Timeline ActiveTimelineEvent in ActiveListTimelineEvent.Value) { ListTimelineEvent.Add(ActiveTimelineEvent.Copy(this)); } DicTimelineEvent.Add(ActiveListTimelineEvent.Key, ListTimelineEvent); } DicGroupEvent = new Dictionary <uint, GroupTimeline>(Other.DicGroupEvent.Count); foreach (KeyValuePair <uint, GroupTimeline> ActiveGroupEvent in Other.DicGroupEvent) { DicGroupEvent.Add(ActiveGroupEvent.Key, (GroupTimeline)ActiveGroupEvent.Value.Copy(this)); } ListVisibleObject = new List <VisibleTimeline>(); ListActiveMarker = new List <MarkerTimeline>(); ListPolygonCutter = new List <PolygonCutterTimeline>(); renderTarget = Other.renderTarget; _LayerBlendState = Other._LayerBlendState; _Alpha = Other._Alpha; ShowChildren = Other.ShowChildren; IsSelected = Other.IsSelected; IsVisible = Other.IsVisible; IsLocked = Other.IsLocked; }