Changeset 103 for trunk/Engine.pas
- Timestamp:
- May 21, 2024, 3:55:43 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Engine.pas
r98 r103 260 260 Lock: TCriticalSection; 261 261 CurrentRound: Integer; 262 Max Round: Integer;262 MaxScore: Integer; 263 263 AudioShot: TSound; 264 264 AudioExplode: TSound; … … 733 733 Explosion(Position, ExplosionRange); 734 734 Exploded := True; 735 ExplosionPending := True; 736 ExplosionTime := Now; 735 737 Engine.AudioExplode.Play; 736 738 end; … … 1883 1885 var 1884 1886 I: Integer; 1887 HighestScore: Integer; 1885 1888 begin 1886 1889 if Players.GetAliveCount <= 1 then begin 1890 HighestScore := 0; 1887 1891 for I := 0 to Players.Count - 1 do 1888 with Players[I] do 1892 with Players[I] do begin 1889 1893 if not Exploded then Inc(Score); 1890 if CurrentRound < MaxRound then begin 1894 HighestScore := Max(Score, HighestScore); 1895 end; 1896 if HighestScore < MaxScore then begin 1891 1897 Inc(CurrentRound); 1892 1898 NewRound; 1893 1899 State := gsNewRound; 1894 end else 1900 end else begin 1895 1901 State := gsMap; 1896 1902 if Assigned(FOnGameEnd) then 1897 1903 FOnGameEnd(Self); 1904 end; 1898 1905 end; 1899 1906 end; … … 2144 2151 InitDigMasks; 2145 2152 Redraw; 2146 Max Round := 5;2153 MaxScore := 3; 2147 2154 end; 2148 2155
Note:
See TracChangeset
for help on using the changeset viewer.