gbegreg / Delphier

Plateform game with Delphi and Firemonkey
21 stars 6 forks source link

Compile error #1

Open vtrx-az opened 1 year ago

vtrx-az commented 1 year ago

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;

gbegreg commented 1 year ago

Can you give more details on errors ? This project need at least Delphi 10.3 (I use inline variable and type inference).

If you used an older version of Delphi, you need to modify the code to change all variables declarations...