public static Vector GetHeadToDraw(this Ufo ufo)
        {
            var centerToDraw = ufo.GetCenterToDraw();

            return(new Vector(centerToDraw.X + ufo.Body.Ry,
                              centerToDraw.Y - ufo.Body.Ry * 0.7f));
        }
Example #2
0
        private void DrawUfo(Ufo ufo, Graphics g)
        {
            var centerToDraw = ufo.GetCenterToDraw();
            var headToDraw   = ufo.GetHeadToDraw();

            g.DrawEllipse(Pens.DarkSeaGreen, headToDraw.X, headToDraw.Y,
                          ufo.Body.Ry * 2, ufo.Body.Ry * 2);

            g.DrawEllipse(Pens.DeepSkyBlue, centerToDraw.X, centerToDraw.Y,
                          ufo.Body.Rx * 2, ufo.Body.Ry * 2);
        }