Example #1
0
 public Vehicle(Lane.Direction initDirection, Lane initLane, float initAcceleration, int startTime)
 {
     direction      = initDirection;
     lane           = initLane;
     position       = new Vector3(0, 0, 0);
     speed          = 0;
     acceleration   = initAcceleration;
     this.startTime = startTime;
 }
Example #2
0
 public Vehicle(Lane initLane, float initAcceleration, int startTime, float scale)
 {
     direction      = initLane.direction;
     lane           = initLane;
     position       = new Vector3(lane.StartPoint.X / scale, 5, lane.StartPoint.Y / scale);
     this.scale     = scale;
     speed          = 0;
     acceleration   = initAcceleration;
     this.startTime = startTime;
 }
Example #3
0
 public Vehicle(Model model, Lane.Direction initDirection, Vector3 initPosition, Lane initLane, float initAcceleration, int startTime)
 {
     this.model     = model;
     direction      = initDirection;
     lane           = initLane;
     position       = initPosition;
     speed          = 0;
     acceleration   = initAcceleration;
     this.startTime = startTime;
 }
Example #4
0
 public void Turn(Lane.Direction newDirection)
 {
     direction = newDirection;
     Turned?.Invoke(this, new EventArgs());
     //change lane
 }