Hat dort jemand eine Lösung? WEnn ja bitte mit entsprechendem Code. Bin Anfänger in Pascal.
Code: Alles auswählen
procedure TForm1.FormKeyPress (Sender: TObject; var Key: char); {Steuerung}
begin
if Ord(Key) = VK_ESCAPE then //ESC - Schließen
Close;
if Ord(Key) = VK_SPACE then //SPACE - Procedure "Start Game"
StartGame;
if Key in ['k', 'K'] then //Steuerung - Verschiebung Schläger in "Y +/-"
DrawBatRight(FBatRightY + 10);
if Key in ['i', 'I'] then
DrawBatRight(FBatRightY - 10);
if Key in ['s', 'S'] then
DrawBatLeft(FBatLeftY + 10);
if Key in ['w', 'W'] then
DrawBatLeft(FBatLeftY - 10);
end;