Example #1
0
 public void Dibujar(Graphics G)
 {
     if (Siguiente != null)
     {
         Siguiente.Dibujar(G);
     }
     G.FillRectangle(new SolidBrush(Color.DarkGreen), this.x, this.y, this.Ancho, this.Ancho);
 }
Example #2
0
 private void IntervaloTiempo_Tick(object sender, EventArgs e)
 {
     G.Clear(Color.White);
     CabezaVibora.Dibujar(G);
     Comida.Dibujar(G);
     Movimiento();
     ChoqueCuerpo();
     ChoquePared();
     if (CabezaVibora.Interseccion(Comida))
     {
         Comida.Colocar();
         CabezaVibora.Meter();
         PuntajePartida++;
         PuntosDePartida.Text = PuntajePartida.ToString();
     }
 }