And here the code when successfully boarding the plane; and going to the next level after 3 successful attempts:
// -----------------------------
// Win Game - Level 1
// -----------------------------
// Board plane - 1st and 2nd time
if ((PosChar=11) and (Row<>2)) then begin
Cntrls:=false;
StopAllTimers;
Row:=Row+1;
SetupGame;
TimerLevel1.Enabled:=true;
end;
// Board plane - 3rd time - Go to level 2
if ((PosChar=11) and (Row=2)) then begin
Cntrls:=false;
StopAllTimers;
Row:=0;
Mode:=2;
SetupGame;
TimerLevel2.Interval:=400;
TimerLevel2.Enabled:=true;
end;
No comments:
Post a Comment