Код:
Procedure TPlayerSprite1.DoMove(MoveCount: Integer);
begin
inherited DoMove(MoveCount);
// ïðè íàæàòèè äâèãàåì îáúåêò âëåâî
if isLeft in MainForm.DXInput.States then
begin
x:=x-15;
Image := MainForm.DXImageListAnime1.Items.Find('obichniy');
end;
// ïðè íàæàòèè äâèãàåì îáúåêò âïðàâî
if isRight in MainForm.DXInput.States then
begin
x:=x+15;
Image := MainForm.DXImageListAnime1.Items.Find('obichniy');
end;
// íèæíèé áëîê
if isButton1 in MainForm.DXInput.States then
Image := MainForm.DXImageListAnime1.Items.Find('BottomBlock');
// âåðõíèé áëîê
if isButton2 in MainForm.DXInput.States then
Image := MainForm.DXImageListAnime1.Items.Find('TopBlock');
// âåðõíèé óäàð
if isButton3 in MainForm.DXInput.States then
begin
PixelCheck := True;
Image:=MainForm.DXImageListAnime1.Items.Find('TopUdar');
Width := Image.Width;
Height := Image.Height;
end;
if maxPrig<300 then
begin
Y:=Y+5;
X:=X+1;
end
else
begin
if y=10 then exit;
Y:=Y-5;
end;
AnimSpeed := 10 / 1000; //ñêîðîñòü àíèìàöèè
// óäàð ëåâîé
if isButton4 in MainForm.DXInput.States then
Image := MainForm.DXImageListAnime1.Items.Find('UdarLevoy');
// óäàð ïðàâîé
if isButton5 in MainForm.DXInput.States then
Image := MainForm.DXImageListAnime1.Items.Find('UdarPravoy');
// íèæíÿÿ ïîäíîæêà
if isButton5 in MainForm.DXInput.States then
Image := MainForm.DXImageListAnime1.Items.Find('UdarNiz');
// óäàð ëåâîé íîãîé
if isButton5 in MainForm.DXInput.States then
Image := MainForm.DXImageListAnime1.Items.Find('UdarNogoyZemlyaLevo');
// óäàð ïðàâîé íîãîé
if isButton5 in MainForm.DXInput.States then
Image := MainForm.DXImageListAnime1.Items.Find('UdarNogoyZemlyaPravo');
if y >= MainForm.DXDraw.SurfaceHeight-image.Height then //íå ïóñêàåì
y := MainForm.DXDraw.SurfaceHeight-image.Height; //îáúåêò
if x >= MainForm.DXDraw.SurfaceWidth -image.Width then //çà ãðàíèöû
x := MainForm.DXDraw.SurfaceWidth -image.Width; //ôîðìû
if y <= 0 then
y := 1;
if x <= 0 then
x:=1;
end;
Так? у меня че-то не робит прога, компилируется, создает фон, а потом ничего не происходит...