Exemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
            graphics.ApplyChanges();
            IsMouseVisible = true;

            btnPlay = new cButton(Content.Load <Texture2D>("btn_new_game"), graphics.GraphicsDevice);
            btnPlay.setPosition(new Vector2(300, 300));

            texLixo = Content.Load <Texture2D>("box");

            heart        = Content.Load <Texture2D>("heart");
            scoreFont    = Content.Load <SpriteFont>("ScoreFont");
            GameOverFont = Content.Load <SpriteFont>("GameOverFont");

            background = new Background(this.Content, GraphicsDevice.Viewport.Width);

            TexturaLixo.LoadTextures(Content);
            TexturaLixeiros.LoadTextures(Content);
            LoadLixeiros();
        }
Exemplo n.º 2
0
 /// <summary>
 /// UnloadContent will be called once per game and is the place to unload
 /// all content.
 /// </summary>
 protected override void UnloadContent()
 {
     TexturaLixeiros.UnloadTextures();
 }