
Un Saludo.
Posted 13 December 2008 - 10:17 AM
Posted 13 December 2008 - 10:23 AM
Posted 13 December 2008 - 10:25 AM
Creo que te le adelantastes a cHackAll, justo me acaba de decir que iba a hacer lo del parpadeo
Posted 13 December 2008 - 10:30 AM
Posted 13 December 2008 - 10:34 AM
Hola
Pero siempre puede ponerle algo mas al programita, la puerta esta abierta amigo.
Saludos
Posted 13 December 2008 - 04:12 PM
Creo que te le adelantastes a cHackAll, justo me acaba de decir que iba a hacer lo del parpadeo
Posted 13 December 2008 - 05:29 PM
Posted 13 December 2008 - 06:04 PM
Hola
He estado intentando, pero no me da.
Puse una imagen adicional del tamaño del sarten para poder ver sus coordenadas, pero no va.
Necesitamos a un, Como dice Eliseo, Maistro![]()
Saludos
Posted 13 December 2008 - 06:07 PM
Posted 13 December 2008 - 06:16 PM
if (Huevo.Top + 40) = (frGallina.Height - Huevo.Height) then begin Huevo.Brush.Color := clRed; Seguir := False; Cuenta:= Cuenta + 1; If Cuenta = 2 Then
Posted 13 December 2008 - 06:19 PM
Posted 13 December 2008 - 06:42 PM
Posted 13 December 2008 - 07:09 PM
Procedure TThreadHuevo.Caer; begin w:= frGallina.Sarten.left; x:= frGallina.Sarten.left + 55; y:= frGallina.Sarten.top; z:= frGallina.Sarten.top + 40; If Cuenta = 2 then cuenta:= 0; Huevo.Top := Huevo.Top + 1; if frGallina.Horizontal.Checked then begin //Realiza el movimiento Vertical if Huevo.Dir = 'DER' then Huevo.Left := Huevo.Left + 2 else Huevo.Left := Huevo.Left - 2; //Si llego al extremo derecho cambia la direccion if (Huevo.Left + Huevo.Width + 10) >= frGallina.Width then Huevo.Dir := 'IZQ'; //Si llego al extremo izquierdo cambia la direccion if (Huevo.Left + Huevo.Width + 10) <= 20 then Huevo.Dir := 'DER'; end; //Si llega al final de la pantalla le cambia el color y la variable para no seguir moviendolo. if (Huevo.Top + 40) = (frGallina.Height - Huevo.Height) then begin Huevo.Brush.Color := clRed; Seguir := False; Cuenta:= Cuenta + 1; If Cuenta = 2 Then begin // Showmessage('Se te Cayeron Los Huevos'); end; if (Huevo.top>=y) and (Huevo.top<=z) then if (Huevo.left>=w) and (Huevo.left<=x) then begin Huevo.Brush.Color := clyellow; Seguir := False; Showmessage('Se te Cayeron Los Huevos'); end; end; end;
Posted 13 December 2008 - 07:16 PM
// Showmessage('Se te Cayeron Los Huevos'); end; if (Huevo.top>=y) and (Huevo.top<=z) then if (Huevo.left>=w) and (Huevo.left<=x) then begin Huevo.Visible :=False; Seguir := False; Showmessage('Uno Huevo al Sarten '); end; end;
Posted 13 December 2008 - 07:27 PM
Posted 13 December 2008 - 07:37 PM
Posted 13 December 2008 - 07:43 PM
Hola
Se ve bien.
Solo falta subirle el top al huevo. (que raro suena![]()
).
Saludos
Posted 13 December 2008 - 07:47 PM
Procedure TThreadHuevo.Caer; var x,w,y,z:integer; begin w:= frGallina.Sarten.left; x:= frGallina.Sarten.left + 55; y:= frGallina.Sarten.top; z:= frGallina.Sarten.top + 40; If Cuenta = 2 then cuenta:= 0; Huevo.Top := Huevo.Top + 1; if frGallina.Horizontal.Checked then begin //Realiza el movimiento Vertical if Huevo.Dir = 'DER' then Huevo.Left := Huevo.Left + 2 else Huevo.Left := Huevo.Left - 2; //Si llego al extremo derecho cambia la direccion if (Huevo.Left + Huevo.Width + 10) >= frGallina.Width then Huevo.Dir := 'IZQ'; //Si llego al extremo izquierdo cambia la direccion if (Huevo.Left + Huevo.Width + 10) <= 20 then Huevo.Dir := 'DER'; end; // aqui desaparece el huevo si entra en la sarten if (Huevo.top + 18 >=y) and (Huevo.top<=z) then if (Huevo.left>=w) and (Huevo.left<=x) then begin Huevo.Visible :=False; Seguir := False; end; //Si llega al final de la pantalla le cambia el color y la variable para no seguir moviendolo. if (Huevo.Top + 40) = (frGallina.Height - Huevo.Height) then begin Huevo.Brush.Color := clRed; Seguir := False; Cuenta:= Cuenta + 1; //aqui se cumple la cuota de huevos rojos. If Cuenta = 2 Then begin // Showmessage('Se te Cayeron Los Huevos'); end; end; end;
Posted 13 December 2008 - 07:52 PM
Posted 13 December 2008 - 08:00 PM
Eso deberia estar en un timer separado.¿El huevo se esta desapareciendo muy arriva del sarten? ¿Solo me pasa a mi?Hola
El problema de la velocidad es que no sale otro huevo hasta que el se atrape o caiga el que salio.
Hay que hacer que salgan los huevos mas seguidos.
Saludos