Changeset 19 for trunk/UMainForm.pas
- Timestamp:
- Sep 27, 2011, 10:16:41 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UMainForm.pas
r18 r19 80 80 Drawing := True; 81 81 StartTime := NowPrecise; 82 Engine.Draw;82 //Engine.Draw; 83 83 DrawDuration := NowPrecise - StartTime; 84 StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' + 85 IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' + 86 IntToStr(TPlayer(Engine.Players[0]).Direction); 87 StatusBar1.Panels[2].Text := FloatToStr(RoundTo(DrawDuration / OneMillisecond, -2)); 88 StatusBar1.Panels[3].Text := IntToStr(TPlayer(Engine.Players[0]).Bullets.Count); 84 try 85 Engine.Lock.Acquire; 86 StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' + 87 IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' + 88 IntToStr(TPlayer(Engine.Players[0]).Direction); 89 StatusBar1.Panels[2].Text := FloatToStr(RoundTo(DrawDuration / OneMillisecond, -2)); 90 StatusBar1.Panels[3].Text := IntToStr(TPlayer(Engine.Players[0]).Bullets.Count); 91 finally 92 Engine.Lock.Release; 93 end; 89 94 finally 90 95 Drawing := False; … … 94 99 procedure TMainForm.TimerEngineTickTimer(Sender: TObject); 95 100 begin 96 Engine.Tick;101 //Engine.Tick; 97 102 end; 98 103 … … 138 143 end; 139 144 Engine.NewGame; 145 Engine.Active := True; 140 146 Image1Resize(Self); 141 147 end;
Note:
See TracChangeset
for help on using the changeset viewer.