ich kriege es immernoch nicht hin
Delphi-Quellcode:
type
TMario = class(TImageSprite)
private
protected
public
constructor Create(AParent:TSprite);override;
procedure GoRight ;
procedure GoLeft ;
procedure GoUp ;
procedure GoDown ;
procedure SetStartPosition;
procedure DoCollision(Sprite: TSprite; var done: boolean); override;
end;
Delphi-Quellcode:
procedure TMario.GoRight;
begin
inherited;
Image:=MyImageList.Find('MarioRIGHT');
X:=X + 0.4;
MyMario.AnimStart:=1;
MyMario.AnimStop :=2;
MyMario.AnimLoop:=true;
MyMario.AnimActive:=true;
MyMario.AnimSpeed:=30;
Collision;
end;
und
Delphi-Quellcode:
procedure TMario.DoCollision(Sprite: TSprite; var done: boolean);
begin
if Sprite is TSnake then
begin
showmessage('geht');
end;
end;
ich weiß nciht was daran falsch ist, es tut sich einfach garnichts
MfG Spiderpig