SHARE
TWEET

Untitled

a guest Dec 16th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. procedure TForma.attackButClick(Sender: TObject);
  2. begin
  3.   if zombijs2Hp <=0 then
  4.   begin
  5.   z2Timer.Enabled := false;
  6.   zombijsImg.Visible := False;
  7.   powerImg.Visible := false;
  8.   zTimer.Enabled := False;
  9.   hitTimer.Enabled := False;
  10.   kostAnim.Stop;
  11.   attackBut.Enabled := false;
  12.   z1dzivibasLab.Visible := false;
  13.   z2dzivibasLab.Visible := false;
  14.   damageLab.Visible := false;
  15.   zombijs2Img.Visible := false;
  16.   end
  17.   else
  18. begin
  19. if zombijs1Hp >=0 then
  20.   begin
  21. if characterImg.Position.X <= zombijsImg.Position.X then
  22. begin
  23.   sautLAnim.Start();
  24.  
  25. end
  26.   else
  27.   begin
  28.     sautKAnim.Start();
  29.   end;
  30.  
  31. if speks = True then
  32. begin
  33.   rand := Random(11)+ 20;
  34.   zombijs1HP := zombijs1HP - rand;
  35.   speks := False;
  36.   z1dzivibasLab.Text := IntToStr(zombijs1HP);
  37.  
  38. end
  39.   else
  40.   begin
  41.   rand := Random(11)+1;
  42.   zombijs1HP := zombijs1HP - rand;
  43.   z1dzivibasLab.Text := IntToStr(zombijs1HP);
  44.  
  45.  
  46.   end;
  47.  end
  48.  else
  49.  begin
  50.   z2Timer.Enabled := True;
  51.   zombijsImg.Visible := False;
  52.   zTimer.Enabled := False;
  53.   hitTimer.Enabled := False;
  54.   kostAnim.Stop;
  55.   level1Img.Visible := false;
  56.   level2Img.Visible := true;
  57.   if a = 1  then
  58.   begin
  59.     a:=a-1;
  60.     powerImg.Visible := True;
  61.   end;
  62.   attackBut.Enabled := true;
  63.   z1dzivibasLab.Visible := false;
  64.   z2dzivibasLab.Visible := true;
  65.   damageLab.Visible := true;
  66.   zombijs2Img.Visible := true;
  67.  
  68.   if characterImg.Position.X <= zombijs2Img.Position.X then
  69. begin
  70.   sautLAnim.Start();
  71.  
  72. end
  73.   else
  74.   begin
  75.     sautKAnim.Start();
  76.   end;
  77.    if speks = True then
  78. begin
  79.   rand := Random(11)+ 20;
  80.   zombijs2HP := zombijs2HP - rand;
  81.   speks := False;
  82.   z1dzivibasLab.Text := IntToStr(zombijs2HP);
  83.  
  84. end
  85.   else
  86.   begin
  87.   rand := Random(11)+1;
  88.   zombijs2HP := zombijs2HP - rand;
  89.   z2dzivibasLab.Text := IntToStr(zombijs2HP);
  90.  
  91.   end;
  92.  
  93.  
  94.      end;//
  95.  end;
  96.   damageLab.Text := IntToStr(rand);
  97. end;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top