Пример #1
0
        /// <summary>
        /// Draws the map.
        /// </summary>
        /// <param name="GameTime"></param>
        public void Draw(GameTime GameTime)
        {
            MapRenderTarget.Begin(transformMatrix: MapCam.GetTransform(), samplerState: SamplerState.LinearWrap);

            BackgroundTiles.Draw(MapRenderTarget);
            if (ParticleSystemsEnabled && BackFogSystem != null)
            {
                BackFogSystem.Draw(MapRenderTarget);
            }

            DrawCaveBase(MapRenderTarget);
            DrawHazards(MapRenderTarget);

            if (ParticleSystemsEnabled && FrontFogSystem != null)
            {
                FrontFogSystem.Draw(MapRenderTarget);
            }

            Player.Draw(MapRenderTarget);
            if (Map.PlayerPath.Contains(Map.Wumpus.Location) || Map.WumpusAlwaysVisisble)
            {
                Wumpus.Draw(MapRenderTarget);
            }

            if (DebugOutline.HasValue)
            {
                MapRenderTarget.Draw(DebugOutlineTexture, DebugOutline.Value, Color.White);
            }

            MapRenderTarget.End();
        }
Пример #2
0
        public void Draw(SpriteBatch target)
        {
            // Draw the dots
            foreach (Vector2 Point in Path.Values.Skip(1).DropLast())
            {
                target.Draw(DotTexture, position: Point - DotOffset, scale: DotScaleVector);
            }

            // Draw the sprites
            PlayerCharacter.Draw(target);
            Wumpus.Draw(target);
        }