Beispiel #1
0
    public Color GetColor(CellHighlightTypes.HighlightType highlightType)
    {
        InitializeDictionary();

        if (_highlightColors.ContainsKey(highlightType))
        {
            return(_highlightColors[highlightType]);
        }
        return(Color.white);
    }
    private void Highlight(bool toHighlight, List <int> cellsIdsToHighlight, CellHighlightTypes.HighlightType highlightType)
    {
        if (!cellsIdsToHighlight.Contains(_cellId))
        {
            return;
        }


        _sprite.enabled = toHighlight;
        if (!_animator.enabled && toHighlight)
        {
            _animator.Rebind();
        }
        _animator.enabled = toHighlight;

        if (toHighlight)
        {
            _sprite.color = _highlightConfig.GetColor(highlightType);
        }
    }
 public void LaunchSignal(bool toHighlight, List <int> cells, CellHighlightTypes.HighlightType highlightType)
 {
     OnHighlightCells?.Invoke(toHighlight, cells, highlightType);
 }