예제 #1
0
        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());
        }
예제 #2
0
 public void RemovePiece(PieceUI piece)
 {
     activePieces.Remove(piece);
 }
예제 #3
0
 public void RegisterPiece(PieceUI piece)
 {
     activePieces.Add(piece);
 }