Пример #1
0
        public void Draw(Batcher2D batcher)
        {
            foreach (var cloud in _clouds)
            {
                cloud.Draw(batcher);
            }

            // bottom of the screen + a little margin
            var b  = _camera.BoundingRect.Bottom + 10;
            var ps = _points.SelectMany(v => VerticalPair(v, b));

            batcher.FillTriangleStrip(ps, new Color(0x15, 0x32, 0x22));
            batcher.DrawLineStrip(_points.Select(ConvertUnits.ToDisplayUnits), Color.Black, 4);

            foreach (var plant in _plants)
            {
                plant.Draw(batcher);
            }

            foreach (var adv in _adversaries)
            {
                adv.Draw(batcher);
            }
        }