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)); }
public void TurnRight() { vehicle.SetSteeringValue(steeringAngle, 2); vehicle.SetSteeringValue(steeringAngle, 3); }