Changeset 5 for trunk


Ignore:
Timestamp:
Mar 26, 2015, 12:20:05 PM (10 years ago)
Author:
chronos
Message:
  • Added: Show passengers inside train.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UEngine.pas

    r4 r5  
    151151
    152152const
    153   LineColors: array[0..5] of TColor = (clBlue, clRed, clYellow, clGreen,
     153  clDarkYellow = TColor($00eeee);
     154  LineColors: array[0..5] of TColor = (clBlue, clRed, clDarkYellow, clGreen,
    154155    clPurple, clGray);
    155156  StationSize = 30;
     
    785786      Canvas.Rectangle(Pos.X - TrainSize div 2, Pos.Y - TrainSize div 2,
    786787        Pos.X + TrainSize div 2, Pos.Y + TrainSize div 2);
     788      Canvas.Brush.Color := clWhite;
     789      for P := 0 to Passengers.Count - 1 do
     790      with TMetroPassenger(Passengers[P]) do begin
     791        DrawShape(Canvas, Point(Pos.X - Trunc(TrainSize div 3 * 1) + (P mod 3) * TrainSize div 3,
     792          Pos.Y - Trunc(TrainSize div 3 * 1) + (P div 3) * TrainSize div 3), Shape, TrainSize div 3);
     793      end;
    787794    end;
    788795  end;
Note: See TracChangeset for help on using the changeset viewer.