Potrzebuje pomocy w z robieniu strzelania powtarzalnego.
Chcę aby shape1 strzelał pociskami shape2
Nie wiem jak mam to zrobić a pilnie jest mi to potrzebne.
Shape1-bohater
Shape2-pocisk
procedure TForm3.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
If Key = VK_LEFT then Shape1.left := Shape1.left - 10;
if Key = VK_RIGHT then Shape1.left := Shape1.left + 10;
if Key = VK_UP then Shape1.top := Shape1.top - 10;
if Key = VK_DOWN then Shape1.top := Shape1.top + 10;
If key = Vk_Escape then
begin
form3.hide;
form4.show;
end;
If key = Vk_SPACE then
begin
Timer1.Enabled := True;
end;
end;
procedure TForm3.Timer1Timer(Sender: TObject);
begin
shape2.left := shape2.left - 100;
end;
end.