MegaMan.Editor.Bll.Tools.TileBrushToolBehavior.Move C# (CSharp) Method

Move() public method

public Move ( ScreenCanvas canvas, Point location ) : void
canvas MegaMan.Editor.Controls.ScreenCanvas
location Point
return void
        public void Move(ScreenCanvas canvas, Point location)
        {
            var screen = canvas.Screen;

            if (!held) return;

            Point pos = new Point(location.X / screen.Tileset.TileSize, location.Y / screen.Tileset.TileSize);
            if (pos == currentTilePos) return; // don't keep drawing on the same spot

            Draw(screen, pos.X, pos.Y);
        }