Пример #1
0
        public void Render(Graphics g)
        {
            if (Children != null)
                for (int i = 0; i < Children.Length; i++)
                    Children[i].Render(g);
            else
            {
                g.DrawText(Objects.Count.ToString(), (int)(X + Root.Offset.X), (int)(Y + Root.Offset.Y));

                if (Objects.Count > 0)
                {
                    Quad q = new Quad(this);
                    //q.Color = ColorPicker.RandomColor();
                    //q.Render(g);

                    for (int i = 0; i < Objects.Count && Objects.Count > 1; i++)
                    {
                        if (Objects[i].Shape.GetType() == typeof(Rectangle))
                        {
                            q = new Quad((Rectangle)Objects[i].Shape);
                            q.Color = ColorPicker.ColorFromRGB(255, 0, 0);
                            q.Render(g);
                        }
                    }
                    for (int i = 0; i < Collisions.Count; i++)
                    {
                        if (Collisions.Get(i).Get(0).Shape.GetType() == typeof(Rectangle)
                            && Collisions.Get(i).Get(1).Shape.GetType() == typeof(Rectangle))
                        {
                            q = new Quad((Rectangle)Collisions.Get(i).Get(0).Shape);
                            q.Color = ColorPicker.ColorFromRGB(0, 255, 0);
                            q.Render(g);

                            q = new Quad((Rectangle)Collisions.Get(i).Get(1).Shape);
                            q.Color = ColorPicker.ColorFromRGB(0, 255, 0);
                            q.Render(g);
                            }
                    }

                }
            }
        }
Пример #2
0
 //Render to the screen
 public override void Render(Graphics g)
 {
 }
Пример #3
0
 public void Render(Graphics g)
 {
     Line line = new Line(0, (int)y, 5000, (int)y);
     line.Color = ColorPicker.ColorFromRGB(255, 0, 0);
     line.Render(g);
 }
Пример #4
0
 //Render to the screen
 public override void Render(Graphics g)
 {
     g.DrawText(FPS.ToString() + " fps", (int)GameEnvironment.Camera.X, (int)GameEnvironment.Camera.Y);
     //g.DrawText("[" + (int)GameEnvironment.Camera.X + ", " + (int)GameEnvironment.Camera.Y + "]", (int)GameEnvironment.Camera.X + 80, (int)GameEnvironment.Camera.Y);
 }
Пример #5
0
 public void Render(Graphics g)
 {
     QTree.Render(g);
 }
Пример #6
0
 //Render to the screen
 public override void Render(Graphics graphics)
 {
     if (Fading || Faded)
     {
         FadeScreen.Color = ColorPicker.FromArgb(FadeAlpha, Color);
         FadeScreen.Render(graphics);
     }
 }
Пример #7
0
 //Render to the screen
 public override void Render(Graphics g)
 {
     //bg.Render(g);
 }