Exemple #1
0
        public HexScene(BodyRenderer bodyRenderer, Rectangle area)
        {
            var palette = Palette.FromXmlFile(DataPack.Colors.Browns);
            var colors = palette.GetColors().Take(4).ToArray();

            // background
            //var bgColor = palette.ColorSets[0].Colors[4];
            //var shape = vectoRendererBg.Add(new VectoShape());
            //shape.DrawRectangle(Vector2.Zero, area.Width, area.Height, true, bgColor);

            AddRange(TestDistribution(area, bodyRenderer, colors));
            Add(Physic.World.CreateLoopShape(area.ToVertices()));
        }