MegaMan.LevelEditor.CursorTool.Click C# (CSharp) Метод

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

public Click ( ScreenDrawingSurface surface, System location ) : void
surface ScreenDrawingSurface
location System
Результат void
        public void Click(ScreenDrawingSurface surface, System.Drawing.Point location)
        {
            // select nearest entity
            var index = surface.Screen.FindEntityAt(location);
            surface.Screen.SelectEntity(index);
            surface.ReDrawEntities();

            heldEntity = surface.Screen.GetEntity(index);
            if (heldEntity != null)
            {
                entityAnchor = new Point(location.X - (int)heldEntity.screenX, location.Y - (int)heldEntity.screenY);
            }
            else
            {
                entityAnchor = Point.Empty;
            }
        }