You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to compile and there are many errors.
First snippet with errors in the variables:
function gererCollisions(position : TPoint; joueur : TImage; unRectangle : TRectangle; detruireObjetTouche: boolean):TCollision;
begin var enCollision := false;
for var recChild in unRectangle.Children do begin var unEnfant : TImage := recChild as TImage;
if (position.X > unEnfant.Position.X) and (position.X < unEnfant.Position.X + unEnfant.Width) and
(position.y + joueur.Height > unEnfant.Position.Y) and (position.y < unEnfant.Position.Y + unEnfant.Height) then begin
enCollision := true;
result.objet := unEnfant;
if detruireObjetTouche then unEnfant.free;
break;
end;
end;
result.enCollision := enCollision;
end;
The text was updated successfully, but these errors were encountered:
I tried to compile and there are many errors.
First snippet with errors in the variables:
function gererCollisions(position : TPoint; joueur : TImage; unRectangle : TRectangle; detruireObjetTouche: boolean):TCollision;
begin
var enCollision := false;
for var recChild in unRectangle.Children do begin
var unEnfant : TImage := recChild as TImage;
if (position.X > unEnfant.Position.X) and (position.X < unEnfant.Position.X + unEnfant.Width) and
(position.y + joueur.Height > unEnfant.Position.Y) and (position.y < unEnfant.Position.Y + unEnfant.Height) then begin
enCollision := true;
result.objet := unEnfant;
if detruireObjetTouche then unEnfant.free;
break;
end;
end;
result.enCollision := enCollision;
end;
The text was updated successfully, but these errors were encountered: