Exemple #1
0
        private Color GetButtonColor(FieldData fieldData, int x, int y)
        {
            var cellDataIndex = fieldData.GetCellDataIndex(x, y);

            if (cellDataIndex == -1)
            {
                return(Color.white);
            }
            else
            {
                var result = Color.red;
                if (editingCellIndex == cellDataIndex)
                {
                    result.r += 0.4f;
                    result.g += 0.4f;
                    result.b += 0.4f;
                }

                return(result);
            }
        }