MegaMan.LevelEditor.BrushTool.Release C# (CSharp) Метод

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

public Release ( ScreenDrawingSurface surface ) : void
surface ScreenDrawingSurface
Результат void
        public void Release(ScreenDrawingSurface surface)
        {
            if (startTiles == null) return;

            held = false;
            var changes = new List<TileChange>();

            for (int y = 0; y < surface.Screen.Height; y++)
            {
                for (int x = 0; x < surface.Screen.Width; x++)
                {
                    if (startTiles[x, y].HasValue && endTiles[x, y].HasValue && startTiles[x, y].Value != endTiles[x, y].Value)
                    {
                        changes.Add(new TileChange(x, y, startTiles[x, y].Value, endTiles[x, y].Value, surface));
                    }
                }
            }

            if (changes.Count > 0) surface.EditedWithAction(new DrawAction("Brush", changes, surface));
            changes.Clear();
        }