MegaMan.LevelEditor.StageForm.Copy C# (CSharp) Метод

Copy() публичный Метод

public Copy ( ) : void
Результат void
        public void Copy()
        {
            if (ActiveSurface != null && ActiveSurface.Selection != null)
            {
                var selection = ActiveSurface.Selection.Value;
                copyBrush = new TileBrush(selection.Width, selection.Height);

                for (int ty = selection.Y; ty < selection.Bottom; ty++)
                {
                    for (int tx = selection.X; tx < selection.Right; tx++)
                    {
                        copyBrush.AddTile(ActiveSurface.Screen.TileAt(tx, ty), tx - selection.X, ty - selection.Y);
                    }
                }
            }
        }

Usage Example

Пример #1
0
 public void Copy()
 {
     if (stageForm != null)
     {
         stageForm.Copy();
     }
 }