コード例 #1
0
ファイル: APathFind.cs プロジェクト: github188/Disney
        public void SetKeyCell(Cell cell)
        {
            Cell cellFind = KeyCells.FirstOrDefault(record => record.Location.Equals(cell.Location));

            if (cellFind == null)
            {
                this.KeyCells.Add(cell);
                MapBmpFillRectangle(cell, Color.DarkSlateBlue);
            }
            else
            {
                cellFind.Name = cell.Name;
            }
        }
コード例 #2
0
ファイル: APathFind.cs プロジェクト: github188/Disney
 public Cell GetKeyCell(int mouseX, int mouseY)
 {
     return(KeyCells.FirstOrDefault(record => record.Location.Equals(new Point(mouseX / this.CELL_WIDTH * CELL_WIDTH, mouseY / this.CELL_WIDTH * CELL_WIDTH))));
 }
コード例 #3
0
ファイル: APathFind.cs プロジェクト: github188/Disney
        public string GetKeyCellName(int mouseX, int mouseY)
        {
            Cell cell = KeyCells.FirstOrDefault(record => record.Location.Equals(new Point(mouseX / this.CELL_WIDTH * CELL_WIDTH, mouseY / this.CELL_WIDTH * CELL_WIDTH)));

            return(cell == null ? string.Empty : cell.Name);
        }