ok, I removed the Sprite.Dead line in the doCollision procedure but still no effect.
My PlayerCreate and NewPlayer code:
Code:
procedure TForm1.PlayerCreate;
begin
Player := TPlayer.Create(DXSpriteEngine1.Engine);
Player.Image := DXImageList1.Items.Find('Player');
Player.X := 500;
Player.Y := 690;
Player.Width := Player.Image.Width;
Player.Height := Player.Image.Height;
Player.PixelCheck := False;
end;
function TForm1.NewPlayer;
begin
Player_No := Player_No + 1;
PlayerCreate;
Result := True;
Lives:= Lives -1;
end;
The following is called in the DXTimer event:
Code:
if (Player.Deaded) then
NewPlayer
else
GameEnd;
GameWin;
Should FShields and amount have values assigned to them?
Bookmarks