コード例 #1
0
        public override void OnPolygonCutterTimelineDeath(PolygonCutterTimeline RemovedPolygonCutter)
        {
            base.OnPolygonCutterTimelineDeath(RemovedPolygonCutter);

            if (DicActiveAnimationObject.ContainsKey(RemovedPolygonCutter.Name))
            {
                DicActiveAnimationObject[RemovedPolygonCutter.Name] = null;
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
 public virtual void OnPolygonCutterTimelineDeath(PolygonCutterTimeline RemovedPolygonCutter)
 {
 }
コード例 #6
0
 public virtual void OnPolygonCutterTimelineSpawn(AnimationLayer ActiveLayer, PolygonCutterTimeline ActivePolygonCutter)
 {
     ActiveLayer.ListPolygonCutter.Add(ActivePolygonCutter);
 }