Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (MainGameLogic.IsFinish())
        {
            if (bStartedFinishAnimation)
            {
                float degrees = Time.deltaTime * 40.0f;
                MainGameLogic.GetMainCamera().transform.RotateAround(magicCube.GetComponent <MagicCubeBehaviour>().getMagicCubeManager().GetPivot(), MainGameLogic.GetMainCamera().transform.up, degrees);
                degreesTurned += degrees;

                cameraZoomTimePassed += Time.deltaTime;
                if (cameraZoomTimePassed > cameraZoomTimer)
                {
                    cameraZoomTimePassed = 0.0f;
                    MainGameLogic.GetMainCamera().GetComponent <CameraControl>().ZoomOut(Time.deltaTime * 2);
                }

                if (degreesTurned >= 360)
                {
                    FinishDialogue();
                }
            }
        }
    }