Changeset 3 for trunk/UMainForm.pas


Ignore:
Timestamp:
Mar 6, 2011, 12:13:35 PM (13 years ago)
Author:
george
Message:
  • Added: Drawing of tanks in eight directions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UMainForm.pas

    r2 r3  
    4747  try
    4848    Timer1.Enabled := False;
    49     Engine.Paint;
     49    Engine.Tick;
    5050    StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' +
    51       IntToStr(TPlayer(Engine.Players[0]).Position.Y);
     51      IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' +
     52      IntToStr(TPlayer(Engine.Players[0]).Direction);
    5253  finally
    5354    Timer1.Enabled := True;
     
    6263    PlayerCount := 2;
    6364    with TPlayer(Players[0]) do begin
    64       Position := Point(25 + Random(World.Surface.Count.X - 50),
    65         25 + Random(World.Surface.Count.Y - 50));
    66       Color := TColor($00f805);
    6765      Keys.Left := 65;
    6866      Keys.Down := 87;
     
    7270    end;
    7371    with TPlayer(Players[1]) do begin
    74       Position := Point(25 + Random(World.Surface.Count.X - 50),
    75         25 + Random(World.Surface.Count.Y - 50));
    76       Color := TColor($00f805);
    7772      Keys.Left := 37;
    7873      Keys.Down := 38;
     
    8277    end;
    8378  end;
     79  Engine.NewGame;
    8480end;
    8581
     
    111107procedure TMainForm.MenuItem3Click(Sender: TObject);
    112108begin
    113 
     109  Engine.NewGame;
    114110end;
    115111
Note: See TracChangeset for help on using the changeset viewer.