Реферат: Разработка приложений для Windows, представляющего собой компьютерную игру Сбей самолет
rocket: TRocket;
Killed: integer=0;
implementation
{$R *.dfm}
//==============================================================================
procedure Colision;
var I: integer;
begin
for i:=1 to n do
begin
if (rocket.X>Su25[i].X) and (rocket.X<(Su25[i].X+Su25[i].Gr.Width)) and
(rocket.Y<(Su25[i].Y+Su25[i].Gr.Height)) and (rocket.Y>Su25[i].Y) then
begin
rocket.Destroed:=true;
rocket.Y:=Form1.Image1.Height+10;
inc(Killed);
FillZap(i);
end;
end;
end;
//==============================================================================
procedure FillZap(ind: integer);
begin
Su25[ind].X:=random(Form1.Image1.Width-35);
Su25[ind].Y:=-1;
Su25[ind].vectX:=random(Form1.Image1.Width div 2);
Su25[ind].vectY:=Form1.Image1.Height+10;
Su25[ind].koef_b:=Su25[ind].X;
Su25[ind].koef_a:=Su25[ind].vectX/Su25[ind].vectY;