Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TForma.attackButClick(Sender: TObject);
- begin
- if zombijs2Hp <=0 then
- begin
- z2Timer.Enabled := false;
- zombijsImg.Visible := False;
- powerImg.Visible := false;
- zTimer.Enabled := False;
- hitTimer.Enabled := False;
- kostAnim.Stop;
- attackBut.Enabled := false;
- z1dzivibasLab.Visible := false;
- z2dzivibasLab.Visible := false;
- damageLab.Visible := false;
- zombijs2Img.Visible := false;
- end
- else
- begin
- if zombijs1Hp >=0 then
- begin
- if characterImg.Position.X <= zombijsImg.Position.X then
- begin
- sautLAnim.Start();
- end
- else
- begin
- sautKAnim.Start();
- end;
- if speks = True then
- begin
- rand := Random(11)+ 20;
- zombijs1HP := zombijs1HP - rand;
- speks := False;
- z1dzivibasLab.Text := IntToStr(zombijs1HP);
- end
- else
- begin
- rand := Random(11)+1;
- zombijs1HP := zombijs1HP - rand;
- z1dzivibasLab.Text := IntToStr(zombijs1HP);
- end;
- end
- else
- begin
- z2Timer.Enabled := True;
- zombijsImg.Visible := False;
- zTimer.Enabled := False;
- hitTimer.Enabled := False;
- kostAnim.Stop;
- level1Img.Visible := false;
- level2Img.Visible := true;
- if a = 1 then
- begin
- a:=a-1;
- powerImg.Visible := True;
- end;
- attackBut.Enabled := true;
- z1dzivibasLab.Visible := false;
- z2dzivibasLab.Visible := true;
- damageLab.Visible := true;
- zombijs2Img.Visible := true;
- if characterImg.Position.X <= zombijs2Img.Position.X then
- begin
- sautLAnim.Start();
- end
- else
- begin
- sautKAnim.Start();
- end;
- if speks = True then
- begin
- rand := Random(11)+ 20;
- zombijs2HP := zombijs2HP - rand;
- speks := False;
- z1dzivibasLab.Text := IntToStr(zombijs2HP);
- end
- else
- begin
- rand := Random(11)+1;
- zombijs2HP := zombijs2HP - rand;
- z2dzivibasLab.Text := IntToStr(zombijs2HP);
- end;
- end;//
- end;
- damageLab.Text := IntToStr(rand);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement