Einzelnen Beitrag anzeigen

Gandalfus

Registriert seit: 19. Apr 2003
407 Beiträge
 
Delphi 2006 Professional
 
#4

Re: Collisionserknnung:problem

  Alt 1. Jan 2005, 13:24
Delphi-Quellcode:
function RectinRect(rect1,rect2: Trect): boolean;
begin
  result := true;
  if (rect1.Left > rect2.BottomRight.x) then result:=false;
  if (rect1.top > rect2.BottomRight.y) then result:=false;
  if (rect2.Left > rect1.BottomRight.x) then result:=false;
  if (rect2.top > rect1.BottomRight.y) then result:=false;
end;
  Mit Zitat antworten Zitat