unit uTrumpAttackRemastered;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, jpeg;
type
TForm1 = class(TForm)
ImMauer: TImage;
LabelTacoAnzahl: TLabel;
ImMex1: TImage;
ImMex2: TImage;
ImMex3: TImage;
ImMex4: TImage;
ImMex5: TImage;
ImMex6: TImage;
Timer1: TTimer;
Timer2: TTimer;
Timer3: TTimer;
Timer4: TTimer;
Timer5: TTimer;
Timer6: TTimer;
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Image5: TImage;
Image6: TImage;
ImTrump: TImage;
Image7: TImage;
Image8: TImage;
Image9: TImage;
Image10: TImage;
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure Timer4Timer(Sender: TObject);
procedure Timer5Timer(Sender: TObject);
procedure Timer6Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
const
Grenze = 1000;
var
Form1: TForm1;
Taco : integer;
implementation
{$R *.dfm}
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key = 'd' then
begin
if ImTrump.Left > Form1.Width
then
ImTrump.Left:= -ImTrump.Width
else
ImTrump.Left := ImTrump.Left + 105;
end;
if key = 'a' then
begin
if ImTrump.Left > Form1.Width
then
ImTrump.Left:= -ImTrump.Width
else
ImTrump.Left := ImTrump.Left - 105;
end;
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var Taco, i : integer;
begin
if key = vk_space then
begin
ImMauer.Visible:=true;
Image6.Visible:=true;
end;
if Form1.ImMex1.Top >= Form1.ImTrump.Top then
begin
Form1.ImMex1.Top := 0;
Taco := Taco + 1;
LabelTacoAnzahl.Caption:= inttostr(Taco);
end;
if Form1.ImMex2.Top >= Form1.ImTrump.Top then
begin
Form1.ImMex2.Top := 0;
Taco := Taco + 1;
LabelTacoAnzahl.Caption:= inttostr(Taco);
end;
if Form1.ImMex3.Top >= Form1.ImTrump.Top then
begin
Form1.ImMex3.Top := 0;
Taco := Taco + 1;
LabelTacoAnzahl.Caption:= inttostr(Taco);
end;
if Form1.ImMex4.Top >= Form1.ImTrump.Top then
begin
Form1.ImMex4.Top := 0;
Taco := Taco + 1;
LabelTacoAnzahl.Caption:= inttostr(Taco);
end;
if Form1.ImMex5.Top >= Form1.ImTrump.Top then
begin
Form1.ImMex5.Top := 0;
Taco := Taco + 1;
LabelTacoAnzahl.Caption:= inttostr(Taco);
end;
if Form1.ImMex6.Top >= Form1.ImTrump.Top then
begin
Form1.ImMex6.Top := 0;
Taco := Taco + 1;
LabelTacoAnzahl.Caption:= inttostr(Taco);
end;
end;
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = vk_space then
begin
ImMauer.Visible:=false;
Image6.Visible:=false;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var i: integer;
begin;
ImMex1.Visible:=true;
ImMex1.Top := ImMex1.Top + 5;
if ImMex1.Top > Form1.Height then
begin
ImMex1.Top := 0;
end;
if (ImTrump.Left > ImMex1.Left) and (ImTrump.Left < ImMex1.Left + ImMex1.Width) then
for i := 1 to Grenze -1 do
begin
Taco:= i+1;
LabelTacoAnzahl.Caption := inttostr(Taco);
end;
end;
procedure TForm1.Timer2Timer(Sender: TObject);
begin
ImMex2.Visible:=true;
ImMex2.Top := ImMex2.Top + 5;
if ImMex2.Top > Form1.Height then
begin
ImMex2.Top := 0;
end;
end;
procedure TForm1.Timer3Timer(Sender: TObject);
begin
ImMex3.Visible:=true;
ImMex3.Top := ImMex3.Top + 5;
if ImMex3.Top > Form1.Height then
begin
ImMex3.Top := 0;
end;
end;
procedure TForm1.Timer4Timer(Sender: TObject);
begin
ImMex4.Visible:=true;
ImMex4.Top := ImMex4.Top + 5;
if ImMex4.Top > Form1.Height then
begin
ImMex4.Top := 0;
end;
end;
procedure TForm1.Timer5Timer(Sender: TObject);
begin
ImMex5.Visible:=true;
ImMex5.Top := ImMex5.Top + 5;
if ImMex5.Top > Form1.Height then
begin
ImMex5.Top := 0;
end;
end;
procedure TForm1.Timer6Timer(Sender: TObject);
begin
ImMex6.Visible:=true;
ImMex6.Top := ImMex6.Top + 5;
if ImMex5.Top > Form1.Height then
begin
ImMex6.Top := 0;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
LabelTacoAnzahl.Caption := inttostr(0);
end;
end.