Beispiel #1
0
        public override void Draw(Graphics g, Camera cam)
        {
            PointF pos  = cam.WorldToScreen(x, y);
            PointF aim  = cam.WorldToScreen((float)(x - Math.Sin(-rot / 180 * Math.PI) * r), (float)(y + Math.Cos(-rot / 180 * Math.PI) * r));
            float  size = cam.Scale(r);

            g.FillEllipse(Brushes.Blue, pos.X - size, pos.Y - size, size * 2, size * 2);

            Pen p = new Pen(Color.Yellow, cam.Scale(10));

            p.EndCap = LineCap.ArrowAnchor;
            g.DrawLine(p, pos.X, pos.Y, aim.X, aim.Y);
        }