Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        tweenTimer += Time.deltaTime;

        if (LeanTween.isTweening(Camera.main.gameObject) && tweenTimer < timeToTween)
        {
            LeanTween.cancel(Camera.main.gameObject);
            LeanTween.move(Camera.main.gameObject, joystickMovement.GetStateVariables().playerTransform.position - cameraLock.GetDistance(), timeToTween - tweenTimer).setOnComplete(LockCamera);
            LeanTween.rotate(Camera.main.gameObject, cameraLock.GetAngle(), timeToTween - tweenTimer);
        }
    }