Ejemplo n.º 1
0
 public Grid(int gridX, int gridY, int w, int h, Camera2D c)
 {
     x = gridX;
     y = gridY;
     tileWidth = w;
     tileHeight = h;
     this.camera = c;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            this.IsMouseVisible = true;
            state = GameState.title;
            currentPlayer = new Player();

            frameImageManager = new FrameImageManager();

            base.Initialize();
            camera = new Camera2D(spriteBatch);
            grid = new Grid(C.xMarginLeft, C.yMargin, C.tileWidth, C.tileHeight, camera);
            grid.setCurrentPlayer(currentPlayer);
            grid.initJewels(frameImageManager);
            turnString = new TurnString(TextureRefs.turnsTexture, 0, C.turnsX, C.turnsY);
        }