예제 #1
0
 public Cell(StaticCellType staticCellType, DynamicCellType dynamicCellType, int x, int y)
 {
     StaticCellType  = staticCellType;
     DynamicCellType = dynamicCellType;
     X = x;
     Y = y;
 }
예제 #2
0
    public Color GetColorForCell(DynamicCellType dynamicCellType)
    {
        if (!_dynamicCellColors.TryGetValue(dynamicCellType, out var cellColor))
        {
            Debug.LogError($"Can't find color for {dynamicCellType}");
            return(Color.white);
        }

        return(cellColor);
    }
예제 #3
0
    private ICell FindCell(DynamicCellType dynamicCellType)
    {
        for (var i = 0; i < _rowsCount; i++)
        {
            for (var j = 0; j < _columnsCount; j++)
            {
                if (Cells[i, j].DynamicCellType != dynamicCellType)
                {
                    continue;
                }

                return(Cells[i, j]);
            }
        }

        return(null);
    }