Changeset 57 for trunk/Forms


Ignore:
Timestamp:
Dec 25, 2022, 9:29:43 AM (23 months ago)
Author:
chronos
Message:
  • Modified: Start new round in delay after tank explosion.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r55 r57  
    191191procedure TFormMain.AShowMapExecute(Sender: TObject);
    192192begin
    193   if not Assigned(FormMap) then FormMap := TFormMap.Create(nil);
     193  if not Assigned(FormMap) then FormMap := TFormMap.Create(Self);
    194194  FormMap.Show;
    195195end;
     
    225225procedure TFormMain.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState
    226226  );
     227const
     228  KeyF11 = 112;
     229var
     230  I: Integer;
    227231begin
    228232  Engine.KeyBoard.KeyState[Key] := False;
     233  {$IFDEF DEBUG}
     234  if Key = KeyF11 then begin
     235    // Destroy first alive player
     236    for I := 0 to Engine.Players.Count - 1 do
     237    with Engine.Players[I] do begin
     238      if not Exploded then begin
     239        Energy := -100;
     240        Break;
     241      end;
     242    end;
     243  end;
     244  {$ENDIF}
    229245end;
    230246
Note: See TracChangeset for help on using the changeset viewer.