示例#1
0
    public void HighlightAvailableMoveCells(Cell cell)
    {
        if (!Options.GetEnablePlacementHelp())
        {
            return;
        }

        modelGrid.ResetCellsColor();

        List <Move> moves = new List <Move>();

        if (PlayerManager.Instance.GetPlayer(GridManager.Instance.ActualTurn).HasAlreadyJumpedOnce)
        {
            moves = optiGrid.GetAvailableMoves(cell, true);
        }
        else
        {
            moves = optiGrid.GetAvailableMoves(cell);
        }

        foreach (Move move in moves)
        {
            Cell toCell = modelGrid.GetCellFromModel(move.toY, move.toX);
            toCell.SetHighlightedCell(true);
        }
    }