Your graphics consist of continuous tiles right? So why does each tile have its own X, Y variable? They have their array position already, that tells exactly where they are at on game screen. IE x*TileWidth, y*TileHeight or something.Code:BackGround[z,x,y].Y
So code like this would be unnecessary:
Code:if BackGround[z,x,y].Y = 480 then begin BackGround[z,x,y].Dead; BackGround[z,x,y]:=nil; end;
Bookmarks