Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #21  
Antiguo 26-12-2007
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Poder: 25
Caral Va por buen camino
Hola
Muy simpático el juego.
Coloca un componente Updow un edit mas y un boton.
En el edit le pones en text 50, sera el minimo.
En el updow le pones en increment 5, para que valla de 5 en 5, en Min 50 y en max 250.
El Updow en eventos:
Associate: Edit2
Aqui pongo el codigo completo, asi lo veras mejor.
Código Delphi [-]
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin

case key of
vk_left:
        image2.Left:=image2.Left-8;
vk_right:
        image2.Left:=image2.left+8;
vk_up:
        begin
        timer2.Interval:=10;
        image3.Visible:=true;
        image3.Left:=image2.Left+30;
        end;
end;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
image1.left:=image1.left+10;
w:=image1.left;
x:=image1.left+104;
y:=image1.top;
z:=image1.top+40;
if image1.left>500 then
  image1.left:=0;
end;

procedure TForm1.Timer2Timer(Sender: TObject);
begin
image1.Visible:=true;
image3.Top:=image3.top-5;
image3.Visible:=true;
if image3.Topthen
  begin
  timer2.interval:=0;
  image3.Visible:=false;
  image3.Top:=376;
  image4.Visible:=false;
  end;
if (image3.top>=y) and (image3.top<=z) then
  if (image3.left>=w) and (image3.left<=x) then
    begin
    image1.Left:=0;
    image4.Visible:=true;
    image4.Top:=image3.Top-15;
    image4.Left:=image3.Left-10;
    image1.Visible:=false;

    s:=s+10;
    str((s+0),p);
    edit1.text:=p;
    If Edit1.Text = '200' then
    begin
    Timer1.Enabled:= False;
    Showmessage('gano');
    Button1.Enabled:= true;
    Edit1.Text := '0';
    s:= 0;
    end;
    end;
end;

procedure TForm1.Edit2Change(Sender: TObject);
begin
   timer1.interval:= StrToInt(Edit2.Text);
end;

procedure TForm1.UpDown1Changing(Sender: TObject;
  var AllowChange: Boolean);
begin
   timer1.interval:= UpDown1.Increment;
end;

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
    Edit2.Enabled:= True;
end;

procedure TForm1.Image2Click(Sender: TObject);
begin
    Edit2.Enabled:= False;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
   Timer1.Enabled:= True;
   Button1.Enabled:= false;
end;

end.
Saludos
Responder Con Cita
  #22  
Antiguo 08-04-2008
alexxx alexxx is offline
Registrado
 
Registrado: dic 2007
Posts: 5
Poder: 0
alexxx Va por buen camino
Thumbs up Saludos a los q me ayudaron...!!!

Q tal hace unos dias recien me entere q aprobe el curso con 15 (puntaje maximo 1 a 20)
gracias amigos me salvaron de una muerte segura en mi casa...
suerte y espero sigan ayudando a mas personas q lo necesiten...
Responder Con Cita
  #23  
Antiguo 14-07-2010
Celta Celta is offline
Miembro
 
Registrado: jul 2010
Ubicación: Salta, Argentina
Posts: 65
Poder: 14
Celta Va por buen camino
Varios Miisiles?

hola a todos mi pregunta es como crear varios misiles grasias ..
Responder Con Cita
  #24  
Antiguo 14-07-2010
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Poder: 25
Caral Va por buen camino
Hola
Aqui estabamos...
Saludos
__________________
Siempre Novato
Responder Con Cita
  #25  
Antiguo 14-07-2010
Avatar de Ñuño Martínez
Ñuño Martínez Ñuño Martínez is offline
Moderador
 
Registrado: jul 2006
Ubicación: Ciudad Catedral, Españistán
Posts: 6.000
Poder: 25
Ñuño Martínez Tiene un aura espectacularÑuño Martínez Tiene un aura espectacular
Cita:
Empezado por Celta Ver Mensaje
hola a todos mi pregunta es como crear varios misiles grasias ..
Pues creándolos... En serio... De veras... Que no te miento... Si no, bájate las fuentes de Allegro.pas y mira el código fuente.
__________________
Proyectos actuales --> Allegro 5 Pascal ¡y Delphi!|MinGRo Game Engine
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
programa de juego en delphi sanchez_bc02 OOP 1 08-10-2007 00:15:36
Juego de la Oca en delphi james_dean OOP 3 10-06-2005 10:09:28
¡¡ ayuda a un novato en mysql+zeos+delphi !! miguelogm Conexión con bases de datos 1 14-03-2005 18:04:12
Novato en php? solicita ayuda? danytorres PHP 5 02-12-2003 09:47:11


La franja horaria es GMT +2. Ahora son las 14:14:47.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi