public static bool IsWalkable(int positionX, int positionY) { MapField nextField = currentMap.map[positionX, positionY]; foreach (var entity in Entities) { if (entity is Cake) { if (entity.PositionX == positionX && entity.PositionY == positionY) { return(false); } } } return(nextField.IsWalkable); }
private void SetMapField(int x, int y, MapField mapField) { map[x, y] = mapField; }
public static void DrawCurrentField(int positionX, int positionY) { MapField currentField = currentMap.map[positionX, positionY]; currentField.Draw(); }