This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
OldPascalProjects/Graphics/WPFObjects/MovingFrameBasedTime.pas
2024-03-10 20:32:51 +03:00

22 lines
433 B
ObjectPascal

uses WPFObjects;
begin
var c := new CircleWPF(Window.Center, 20, Colors.Green);
OnDrawFrame := dt begin
c.MoveTime(dt);
end;
OnKeyDown := k begin
case k of
Key.Left: c.Direction := (-5, 0);
Key.Right: c.Direction := (5, 0);
Key.Up: c.Direction := (0, -5);
Key.Down: c.Direction := (0, 5);
end;
end;
OnKeyUp := k begin
c.Direction := (0, 0);
end;
end.