Esempio n. 1
0
    public void OutlineBoardSpaceOnEnter(GameObject selectedSpace, int row, int column)
    {
        if (_gamePieceManager.GetSelectedGamePieces().Count != 0)
        {
            var gamePieceOnBoard = GetGamePieceAtSpecificBoardSpace(row, column);
            if (CanGamePieceBePlaced(gamePieceOnBoard, _gamePieceManager.GetSelectedGamePieces()[0]))
            {
                var outline = selectedSpace.GetComponent <Outline>() != null?selectedSpace.GetComponent <Outline>() : selectedSpace.AddComponent <Outline>();

                outline.OutlineMode  = Outline.Mode.OutlineAll;
                outline.OutlineColor = Color.yellow;
                outline.OutlineWidth = 5f;
            }
        }
    }