Registriert seit: 16. Mär 2004
2.287 Beiträge
|
Re: Frage zu array
24. Jun 2004, 19:28
also so in etwa:
Delphi-Quellcode:
//player
for i:=1 to PlayerAnzahl do
with TPlayer.Create(DXSpriteEngine1.Engine) do
begin
Player[i] := TPlayer.Create(DXSpriteEngine1.Engine);
Player[i].Image:=Form1.DXImageList1.Items[0];
Player[i].x:=strtoint(s)*32;
Player[i].y:=strtoint(t)*32;
end;
for i:=1 to EnemyAnzahl do
with TEnemy.Create(DXSpriteEngine1.Engine) do
begin
Enemy[i] := ETnemy.Create(DXSpriteEngine1.Engine);
Enemy[i].Image:=Form1.DXImageList1.Items[0];
Enemy[i].x:=strtoint(s)*32;
Enemy[i].y:=strtoint(t)*32;
end;
»Unlösbare Probleme sind in der Regel schwierig...«
|