示例#1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            graphics.PreferredBackBufferHeight = 640;
            graphics.PreferredBackBufferWidth = 640;
            graphics.ApplyChanges();

            chessModel = new ChessModel();
            chessModel.CanTakeCommand = true;
        }
        public ChessView(ChessModel chessModel, ContentManager content, GraphicsDevice device)
        {
            spriteBatch = new SpriteBatch(device);

            camera = new Camera(device, chessModel);
            this.chessModel = chessModel;

            ChessBackground = content.Load<Texture2D>("ChessBackground.png");
            ChessBlackSquare = content.Load<Texture2D>("ChessBlackSquare.png");
            ChessWhiteSquare = content.Load<Texture2D>("ChessWhiteSquare.png");
            ChessQueenPiece = content.Load<Texture2D>("ChessQueenImage.jpg");
        }
示例#3
0
 public Camera(GraphicsDevice device, ChessModel chessModel)
 {
     this.device = device;
     this.chessModel = chessModel;
     UpdateResolutionValues();
 }