?? map.cs
字號:
using System;
namespace HenizeSoftware
{
namespace PathFinding
{
class Map
{
bool[,] map;
public Map(ushort x, ushort y)
{
map = new bool[x, y];
}
public Map(ushort x, ushort y, Coordinate[] unwalkableNodes)
: this(x, y)
{
if (unwalkableNodes == null)
return;
foreach (Coordinate c in unwalkableNodes)
{
map[c.X, c.Y] = true;
}
}
public bool this[ushort x, ushort y]
{
get
{
return (!(x >= 0 && x <= map.GetUpperBound(0) && y >= 0 && y <= map.GetUpperBound(1)) || map[x, y]);
}
set
{
map[x, y] = value;
}
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -