/// <summary>
 /// Asked to return information that permits the lifeform to be drawned.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void DrawEventHandler(object sender, ControlEvents.DrawEventArgs e)
 { //delegate. Transmit location, design and colour back.
     if (Design != null)
     {
         (Point[] Design, Colour Colour, Vector Location)drawInforamtion = (helper.DeepCopy(Design), Colour, Location);  //(type,type) will ac
         e.AddDrawInformation(drawInforamtion);
     }
 }
Exemplo n.º 2
0
        protected List <(Point[] Design, Colour Colour, Vector Location)> OnDraw(ControlEvents.DrawEventArgs e)
        {
            drawEventHandler eventHandler = RaiseDrawEvent;

            if (eventHandler != null)
            {
                eventHandler.Invoke(this, e);
                return(e.DrawInformation);
            }
            return(null);
        }