コード例 #1
0
 /*
  * internal static void refreshXCellColours(int cellIndex, int cellsToUpdate)
  * {
  *  for(int i = cellIndex; i > (Math.Max(0, cellIndex - cellsToUpdate)); i--)
  *  {
  *      Cell cell = new Cell((uint)i);
  *      or.SetCellColor(cell, getCellColor(currentLayer, cell));
  *  }
  * }
  */
 internal static void refreshCellColours()
 {
     if (currentLayer < PD.LiveMap.Count)
     {
         var colors = new CellMap <Color32>(PD.gridLevel, c => getCellColor(currentLayer, c));
         or.SetCellColors(colors);
     }
     else
     {
         var colors = new CellMap <Color32>(PD.gridLevel, c => getStratoCellColor(currentLayer - PD.LiveMap.Count, c));
         or.SetCellColors(colors);
     }
 }
コード例 #2
0
        /*
         * internal static void refreshXCellColours(int cellIndex, int cellsToUpdate)
         * {
         *  for(int i = cellIndex; i > (Math.Max(0, cellIndex - cellsToUpdate)); i--)
         *  {
         *      Cell cell = new Cell((uint)i);
         *      or.SetCellColor(cell, getCellColor(currentLayer, cell));
         *  }
         * }
         */
        internal static void refreshCellColours()
        {
            var colors = new CellMap <Color32>(PD.gridLevel, c => getCellColor(currentLayer, c));

            or.SetCellColors(colors);
        }