Einzelnen Beitrag anzeigen

Nicodius

Registriert seit: 25. Apr 2003
Ort: Graz
2.234 Beiträge
 
Delphi 2006 Architect
 
#4

Re: Was wäre die Beste Lösung für ein Inventar

  Alt 26. Jun 2004, 14:22
da ich dx jetzt nicht habe +


was mir auffällt

Beim onmousedown


Delphi-Quellcode:
//for k:=0 to 1 do begin
if (X>=Gegenstand[k].X) and (X<=Gegenstand[k].X+32) and (Y>=Gegenstand[k].Y) and (Y<=Gegenstand[k].Y+32)
then Gegenstand[k].hant:=true;
//end;
schreibs mal so wie ich ohne forschleife und probiers dann


falls es das nicht ist dann schreib

bei

Delphi-Quellcode:
  for i:=0 to 1 do begin
  if (Sack.py[k]=Gegenstand[i].Y-Sack.Y)and(Sack.py[k]=Gegenstand[i].Y-Sack.Y) and
  (Sack.px[k]=Gegenstand[i].x-Sack.x)and(Sack.px[k]=Gegenstand[i].x-Sack.x)
  then Sack.platz[k]:=false;
  end;
auch nur
Delphi-Quellcode:
  if (Sack.py[k]=Gegenstand[i].Y-Sack.Y)and(Sack.py[k]=Gegenstand[i].Y-Sack.Y) and
  (Sack.px[k]=Gegenstand[i].x-Sack.x)and(Sack.px[k]=Gegenstand[i].x-Sack.x)
  then Sack.platz[k]:=false;

und sonst beides
Nico Müller
  Mit Zitat antworten Zitat