예제 #1
0
파일: TileMap.cs 프로젝트: GodLesZ/svn-dump
		public void Draw(SpriteBatch batch, IEngineCamera camera, double totalSeconds, ETileDrawType drawType, Point2D min, Point2D max, bool makePreview) {
			bool drawBackground = (drawType & ETileDrawType.BackGround) == ETileDrawType.BackGround;
			bool drawForeground = (drawType & ETileDrawType.ForeGround) == ETileDrawType.ForeGround;

			foreach (TileLayer layer in Layers) {
				if (!(layer.IsBackground && drawBackground) && !(layer.IsForeground && drawForeground)) {
					continue;
				}

				layer.Draw(batch, camera, min, max, 0f, makePreview);
			}

			if ((drawType & ETileDrawType.Animation) == ETileDrawType.Animation)
				AnimationLayer.Draw(batch, camera, totalSeconds, min, max);

			if ((drawType & ETileDrawType.Fog) == ETileDrawType.Fog)
				DrawFog(batch, camera, min, max);

		}
예제 #2
0
        public void Draw(SpriteBatch batch, IEngineCamera camera, double totalSeconds, ETileDrawType drawType, Point2D min, Point2D max, bool makePreview)
        {
            bool drawBackground = (drawType & ETileDrawType.BackGround) == ETileDrawType.BackGround;
            bool drawForeground = (drawType & ETileDrawType.ForeGround) == ETileDrawType.ForeGround;

            foreach (TileLayer layer in Layers)
            {
                if (!(layer.IsBackground && drawBackground) && !(layer.IsForeground && drawForeground))
                {
                    continue;
                }

                layer.Draw(batch, camera, min, max, 0f, makePreview);
            }

            if ((drawType & ETileDrawType.Animation) == ETileDrawType.Animation)
            {
                AnimationLayer.Draw(batch, camera, totalSeconds, min, max);
            }

            if ((drawType & ETileDrawType.Fog) == ETileDrawType.Fog)
            {
                DrawFog(batch, camera, min, max);
            }
        }