Beispiel #1
0
    public override void Going(float carSpeed)
    {
        Vector3 speed = carController.transform.forward * carSpeed * GameDatas.GetCarSpeedMultiplier();

        speed -= carController.transform.right * laneShiftingSpeed;

        carController.SetCarVelocity(speed);

        float goalLanePos = GetLanePosition();

        if (Mathf.Abs(carController.transform.position.x - goalLanePos) < laneTolerance)
        {
            carController.TransitionState(carController.straightState);
        }
    }
 public override void Going(float carSpeed)
 {
     carController.SetCarVelocity(carController.transform.forward * carSpeed * GameDatas.GetCarSpeedMultiplier());
 }