Esempio n. 1
0
        /// <summary>
        /// Draws the level and any entities it contains.
        /// </summary>
        public void Draw()
        {
            this.background.Draw();

            foreach (Platform platform in this.platforms)
            {
                platform.Draw();
            }

            SceneryRenderer.DrawTerrain(this.spriteBatch, this.rockyTerrain, this.visualFloorEdges, this.gameDisplayResolution.Y * 1.5f);
            foreach (InteractiveEntity entity in this.interactiveEntities)
            {
                entity.Draw();
            }

            this.exit.Draw();
            this.stickman.Draw();
            if (this.mineCart != null)
            {
                this.mineCart.Draw();
                this.cartSwitch.Draw();
            }

            if (!this.scrollingDeath.Active)
            {
                RenderableText.Draw(this.startText, this.gameDisplayResolution / 2.0f, 0.0f, Color.Black);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Draws the level.
        /// </summary>
        public void Draw()
        {
            this.background.Update();
            this.background.Draw();
            if (this.StartPosition != Vector2.Zero)
            {
                Camera2D.Draw(this.startSprite, this.StartPosition, 0.0f);
            }

            if (this.ExitPosition != Vector2.Zero)
            {
                Camera2D.Draw(this.exitSprite, this.ExitPosition, 0.0f);
            }

            SceneryRenderer.DrawTerrain(this.spriteBatch, this.rockyTerrain, this.floorEdgePoints, this.screenDimensions.Y * 1.5f);
            foreach (PlatformDescription platformDescription in this.platformDescriptions)
            {
                this.DrawPlatform(platformDescription);
            }

            foreach (InteractiveEntityDescription entityDescription in this.interactiveEntityDescriptions)
            {
                this.DrawInteractiveEntity(entityDescription);
            }
        }