private static int CheckGrid(FarmGrid farmGrid, List <FarmGrid.Grid> fieldGrids, int checkGridX, int checkGridY, bool isIgnorePutedFlag) { int gridIndex = farmGrid.GetGridIndex(checkGridX, checkGridY); if (gridIndex != -1 && FarmUtility.IsPassableGrid(fieldGrids, gridIndex, isIgnorePutedFlag)) { return(gridIndex); } return(-1); }
public int[] GetPassableGridIndexs(int[] gridIndexs) { List <int> list = new List <int>(); List <FarmGrid.Grid> grids = this.farmField.GetField().grids; foreach (int num in gridIndexs) { if (0 <= num && num < grids.Count && FarmUtility.IsPassableGrid(grids, num, false)) { list.Add(num); } } return(list.ToArray()); }
public int[] GetPassableGridIndexs() { List <int> list = new List <int>(); List <FarmGrid.Grid> grids = this.farmField.GetField().grids; for (int i = 0; i < grids.Count; i++) { if (FarmUtility.IsPassableGrid(grids, i, false)) { list.Add(i); } } return(list.ToArray()); }