public void Brake() { vehicle.SetBrake(brakeForce, 0); vehicle.SetBrake(brakeForce, 1); vehicle.SetBrake(brakeForce * 0.66f, 2); vehicle.SetBrake(brakeForce * 0.66f, 3); }
public override void OnUpdate() { gEngineForce *= (1.0f - FrameDelta); vehicle.ApplyEngineForce(gEngineForce, 2); vehicle.SetBrake(gBreakingForce, 2); vehicle.ApplyEngineForce(gEngineForce, 3); vehicle.SetBrake(gBreakingForce, 3); vehicle.SetSteeringValue(gVehicleSteering, 0); vehicle.SetSteeringValue(gVehicleSteering, 1); base.OnUpdate(); }
public override int Update(float elapsedTime) { gEngineForce *= (1.0f - elapsedTime); vehicle.ApplyEngineForce(gEngineForce, 2); vehicle.SetBrake(gBreakingForce, 0); vehicle.ApplyEngineForce(gEngineForce, 3); vehicle.SetBrake(gBreakingForce, 1); vehicle.SetSteeringValue(gVehicleSteering, 0); vehicle.SetSteeringValue(gVehicleSteering, 1); return(base.Update(elapsedTime)); }