Ejemplo n.º 1
0
        public static Texture2D GetTextureForPiece(kSides side, kPieceTypes pieceType)
        {
            string    fileName = string.Format("Resources\\Pieces\\old_{0}_{1}_25x25.png", kPieceColourDict[side], kPieceStrDict[pieceType]);
            Texture2D texture  = Texture2D.FromStream(Game1.Instance.GraphicsDevice, File.OpenRead(fileName));

            return(texture);
        }
Ejemplo n.º 2
0
 public ChessPiece(kSides side, kPieceTypes pieceType, ChessPosition position)
 {
     this.side = side;
     this.pieceType = pieceType;
     this.isActive = true;
     this.isSelected = false;
     this.position = position;
     this.initTexture();
 }
Ejemplo n.º 3
0
 public ChessPiece(kSides side, kPieceTypes pieceType, ChessPosition position)
 {
     this.side       = side;
     this.pieceType  = pieceType;
     this.isActive   = true;
     this.isSelected = false;
     this.position   = position;
     this.initTexture();
 }
Ejemplo n.º 4
0
 public static Texture2D GetTextureForPiece(kSides side, kPieceTypes pieceType)
 {
     string fileName = string.Format("Resources\\Pieces\\old_{0}_{1}_25x25.png", kPieceColourDict[side], kPieceStrDict[pieceType]);
     Texture2D texture = Texture2D.FromStream(Game1.Instance.GraphicsDevice, File.OpenRead(fileName));
     return texture;
 }