Пример #1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.White);
            spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.NonPremultiplied,
                              SamplerState.PointClamp, null, null, null, camera.TranslationMatrix);
            map.Draw(spriteBatch);
            trainingDummy.Draw(spriteBatch);
            player.Draw(spriteBatch);

            spriteBatch.Draw(tempCrate, tempCrateRect, Color.White);
            tempChest.Draw(spriteBatch);

            spriteBatch.Draw(torchTexture, torchRect, new Rectangle(currentFrame * 16, 0, 16, 16), Color.White);
            spriteBatch.Draw(torchTexture, new Rectangle(160, 32, 32, 32), new Rectangle(currentFrame * 16, 0, 16, 16), Color.White);

            spriteBatch.Draw(textureHandler.cursorTexture, new Rectangle((int)cursorPosition.X, (int)cursorPosition.Y, 8, 8), Color.White);
            spriteBatch.End();

            //UI
            spriteBatch.Begin(SpriteSortMode.Deferred);

            //Dev
            devConsole.Draw(spriteBatch);
            spriteBatch.End();
            base.Draw(gameTime);
        }