Инициализацию координат сделай в конструторе,
Код:
Constructor TEnemy.Create(AParent:TSprite);
begin
inherited Create(AParent);
image:=GameForm.MonsterList.Items.Find('SpiderStandRight');
Width:=Image.Width;
Height:=Image.Height;
PixelCheck := True;
AnimCount :=Image.PatternCount;
AnimLooped := True;
AnimSpeed := 100 / 1000;
Location.x:=Random(300);
Location.Y:=200;
x:=Location.X; //присваиваю координаты
y:=Location.Y;
State:= msLive;
Collision;
end;
А тут уже только создавай
Код:
Procedure TGameForm.NewEnemy;
var
i:integer;
MasM: array of TEnemy;
begin
for i:=1 to 5 do
begin
SetLength(MasM,Length(MasM)+1);
MasM[High(MasM)]:=TEnemy.Create(DXSpriteEng.Engine);
end;
end;