chcialam spytac czy ten kod, ktory zostal zamieszczony na forum mozna przerobic
type
TG = class(TImageSprite)
protected
procedure DoMove(MoveCount: Integer); override;
end;
procedure TG.DoMove(MoveCount: Integer);
begin
inherited DoMove(MoveCount);
if isUp in Form1.DXInput.States then
Y:=Y-2;
if isDown in Form1.DXInput.States then
Y:=Y+2;
if isLeft in Form1.DXInput.States then
X:=X-2;
if isRight in Form1.DXInput.States then
X:=X+2;
end;
w oncreat
procedure TForm1.FormCreate(Sender: TObject);
begin
G := TG.Create(SEngine.Engine);
G.Image := DXImageList1.Items[0];
G.Width := DXImageList1.Items[0].Width;
G.Height:= DXImageList1.Items[0].Height;
G.X := 50; //pozycja x
G.Y := 50; //pozycja y
end;
a w ontimer
DXInput.Update;
SEngine.Move(lagcount);
SEngine.Draw;
DXDraw1.flip;
DXDraw1.Surface.Fill(0);
czy da rade zrobic to nie w delphix tylko np zeby obiekt jpg wyswietlaj sie na Tpanel wraz z kolizja obrazków i poruszaniem sie obrazku??? czy koniecznie potrzebne jest uzycie delphix