public override void OnPolygonCutterTimelineDeath(PolygonCutterTimeline RemovedPolygonCutter) { base.OnPolygonCutterTimelineDeath(RemovedPolygonCutter); if (DicActiveAnimationObject.ContainsKey(RemovedPolygonCutter.Name)) { DicActiveAnimationObject[RemovedPolygonCutter.Name] = null; } }
public override List <VisibleTimeline> CreateNewEditorItem(AnimationClass ActiveAnimation, AnimationClass.AnimationLayer ActiveLayer, int KeyFrame, System.Drawing.Point MousePosition) { List <VisibleTimeline> ReturnValue = new List <VisibleTimeline>(); Vector2[] LocalPoints = new Vector2[4] { new Vector2(MousePosition.X - 40, MousePosition.Y - 40), new Vector2(MousePosition.X - 40, MousePosition.Y + 40), new Vector2(MousePosition.X + 40, MousePosition.Y + 40), new Vector2(MousePosition.X + 40, MousePosition.Y - 40), }; PolygonCutterTimeline NewCreatePolygonCutterEvent = new PolygonCutterTimeline("New Polygon Cutter", Vector2.Zero, ActiveLayer); PolygonCutterHelper NewSpawner = new PolygonCutterHelper(ActiveLayer.renderTarget, NewCreatePolygonCutterEvent.ListPolygon, true); NewSpawner.PolygonCutterViewer.ListPolygon.Add(new Polygon(LocalPoints, GameScreen.GraphicsDevice.Viewport.Width, GameScreen.GraphicsDevice.Viewport.Height)); if (NewSpawner.ShowDialog() == System.Windows.Forms.DialogResult.OK) { NewCreatePolygonCutterEvent.SpawnFrame = KeyFrame; NewCreatePolygonCutterEvent.DeathFrame = KeyFrame + 10; NewCreatePolygonCutterEvent.IsUsed = true;//Disable the spawner as we spawn the timeline manually. PolygonCutterKeyFrame NewPolygonCutterKeyFrame = new PolygonCutterKeyFrame(ActiveLayer, NewCreatePolygonCutterEvent.Position, true, -1); foreach (Polygon NewPolygon in NewSpawner.PolygonCutterViewer.ListPolygon) { NewPolygonCutterKeyFrame.ListPolygon.Add(new Polygon(NewPolygon)); } NewCreatePolygonCutterEvent.ListPolygon.AddRange(NewSpawner.PolygonCutterViewer.ListPolygon); NewCreatePolygonCutterEvent.Add(KeyFrame, NewPolygonCutterKeyFrame); ReturnValue.Add(NewCreatePolygonCutterEvent); } return(ReturnValue); }
public override Timeline Copy(AnimationClass.AnimationLayer ActiveLayer) { PolygonCutterTimeline NewPolygonCutterTimeline = new PolygonCutterTimeline(); NewPolygonCutterTimeline.SourceRectangle = SourceRectangle; NewPolygonCutterTimeline.ListPolygon = new List <Polygon>(ListPolygon.Count); foreach (Polygon ActivePolygon in ListPolygon) { NewPolygonCutterTimeline.ListPolygon.Add(new Polygon(ActivePolygon)); } NewPolygonCutterTimeline._PolygonCutterType = _PolygonCutterType; NewPolygonCutterTimeline._PolygonCutterSpecialEffect = _PolygonCutterSpecialEffect; NewPolygonCutterTimeline.ArrayMoveValue = ArrayMoveValue; NewPolygonCutterTimeline.UpdateFrom(this, ActiveLayer); NewPolygonCutterTimeline.EventOld = (PolygonCutterKeyFrame)NewPolygonCutterTimeline.DicAnimationKeyFrame[0]; return(NewPolygonCutterTimeline); }
public override void OnPolygonCutterTimelineSpawn(AnimationLayer ActiveLayer, PolygonCutterTimeline ActivePolygonCutter) { base.OnPolygonCutterTimelineSpawn(ActiveLayer, ActivePolygonCutter); if (DicActiveAnimationObject.ContainsKey(ActivePolygonCutter.Name)) { DicActiveAnimationObject[ActivePolygonCutter.Name] = ActivePolygonCutter; } else { DicActiveAnimationObject.Add(ActivePolygonCutter.Name, ActivePolygonCutter); } }
public virtual void OnPolygonCutterTimelineDeath(PolygonCutterTimeline RemovedPolygonCutter) { }
public virtual void OnPolygonCutterTimelineSpawn(AnimationLayer ActiveLayer, PolygonCutterTimeline ActivePolygonCutter) { ActiveLayer.ListPolygonCutter.Add(ActivePolygonCutter); }