Forum: Sonstige Fragen zu Delphi
Delphi
by CK_CK,
4. Jul 2008
Wenn es funktioniert, dann wird's wohl in Ordnung sein ;)
Das einzige ist, dass du den Code noch etwas aufräumen kannst. Z.B. so:if Game.Active then
begin
if (GetAsyncKeyState(Ord('W')) < 0) and (Image11.Top > 1) then Stepup;
if (GetAsyncKeyState(Ord('A')) < 0) and (Image11.left > 1) then Stepleft;
if (GetAsyncKeyState(Ord('S')) < 0) and (Image11.top < 350) then Stepdown;
if...
Forum: Sonstige Fragen zu Delphi
Delphi
by CK_CK,
4. Jul 2008
Und nochwas. Das hier:if Bewegung=false then ...macht man so:if not Bewegung then ...
Und das hier:if Game.Active=true then ... sollte man so machen:if Game.Active then ...
(Ich bekomme immer Augenkrebs, wenn ich sowas sehe :angel2:)
Chris