private Piece CreatePiece(PieceColor color, Row row, Column col, PieceAndPrefab pieceAndPrefab) { PieceUI pieceUI = Instantiate(pieceAndPrefab.prefab, piecesParent); Tile tile = board.GetTile(row, col); pieceUI.Initialize(color, tile, board, artSet.GetSpriteVariants(pieceAndPrefab.type), moveManager); piecesWithUI.Add(pieceUI.GetPiece(), pieceUI); return(pieceUI.GetPiece()); }
public void RemovePiece(PieceUI piece) { activePieces.Remove(piece); }
public void RegisterPiece(PieceUI piece) { activePieces.Add(piece); }