Thema: Delphi Kleines Pferdespiel

Einzelnen Beitrag anzeigen

Benutzerbild von implementation
implementation

Registriert seit: 5. Mai 2008
940 Beiträge
 
FreePascal / Lazarus
 
#20

Re: Kleines Pferdespiel

  Alt 7. Jan 2010, 19:04
Zitat von mb1996:
Delphi-Quellcode:
...
if Pferd1.left=Block1.left then
begin
if Pferd1.top=Block1.top then
begin
...
{Das Verhalten bei dem aufprall}
end;
end;
Wohl eher so:
Delphi-Quellcode:
if (Pferd.Left+Pferd.Width=Block1.Left) or (Pferd.Left=Block1.Left+Block1.Width)
  or (Pferd.Top+Pferd.Height=Block1.Top) then ...
  Mit Zitat antworten Zitat