Advertisement
Guest User

Untitled

a guest
Jun 16th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.68 KB | None | 0 0
  1. unit MainFormUnit;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  9.   StdCtrls;
  10.  
  11. type
  12.  
  13.   { TMainForm }
  14.  
  15.   TMainForm = class(TForm)
  16.     RestartEntityButton: TButton;
  17.     Entity: TShape;
  18.     EntityTimer: TTimer;
  19.     procedure OnEntityTimer(Sender: TObject);
  20.     procedure RestartEntity(Sender: TObject);
  21.   private
  22.  
  23.   public
  24.  
  25.   end;
  26.  
  27. var
  28.   MainForm: TMainForm;
  29.  
  30. implementation
  31.  
  32. {$R *.lfm}
  33.  
  34. { TMainForm }
  35.  
  36. procedure TMainForm.OnEntityTimer(Sender: TObject);
  37. begin
  38.   Entity.Top := Entity.Top + 1;
  39. end;
  40.  
  41. procedure TMainForm.RestartEntity(Sender: TObject);
  42. begin
  43.   Entity.Top := 0;
  44. end;
  45.  
  46. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement