Beispiel #1
0
 public CocoPiece Build(Piece piece)
 {
     var strColor = piece.Color == PieceColor.White ? "w" : "b";
     var spriteName = strColor + "_" + Enum.GetName(typeof(PieceType), piece.Type).ToLower() + ".png";
     var cocoPiece = new CocoPiece(piece, cache[spriteName]);
     return cocoPiece;
 }
Beispiel #2
0
        public CocoPiece Build(Piece piece)
        {
            var strColor   = piece.Color == PieceColor.White ? "w" : "b";
            var spriteName = strColor + "_" + Enum.GetName(typeof(PieceType), piece.Type).ToLower() + ".png";
            var cocoPiece  = new CocoPiece(piece, cache[spriteName]);

            return(cocoPiece);
        }