public GameStateManager(Game game, Viewport viewport)
            : base(game)
        {
            drawOrder = startDrawOrder;

            GameStates = new Stack<GameState>();
            Viewport = viewport;
            Camera = new Camera(Viewport.Bounds);
        }
Beispiel #2
0
        public void Draw(SpriteBatch spriteBatch, Camera camera)
        {
            Map.Draw(spriteBatch, camera);

            foreach (Character character in Characters)
                character.Draw(spriteBatch);

            foreach (ItemSprite sprite in Chests)
                sprite.Draw(spriteBatch);
        }
Beispiel #3
0
 public void DrawLevel(SpriteBatch spriteBatch, Camera camera)
 {
     Levels[currentLevel].Draw(spriteBatch, camera);
 }