📄 pool.pas
字号:
unit pool;
interface
uses classes,DXClass, DXDraws, DirectX,dialogs;
type tball=class(tobject)
xpos,ypos:real; // position on the pool table
xv,yv:real; // speed vector
ballframe:IDirect3DRMFrame; // Direct3d visual model
scene:tdxdraw;
constructor create( var dxdraw:TDXDraw);
destructor destroy;override;
procedure repaint; // repaint ball
procedure tormoz(eps:real); // decrimation speed
end;
ttable=class(tobject)
xsize,ysize:real; // phisical size of table
balllist:tlist; // list of balls
radius:real; // ball's radius
scene:tdxdraw;
constructor create( var dxdraw:TDXDraw); //init table
procedure moveball(index:integer); // compute one ball traectory
procedure deleteball(index:integer); //remove ball from the board
procedure addball; //addball in random position
procedure domove; // 镥疱戾耱栩
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -