Exemple #1
0
    IEnumerator AddIngredient()
    {
        submitting               = true;
        transform.position       = cauldron.transform.position + new Vector3(0f, -0.8f, 0f);
        playerController.enabled = false;
        animator.SetBool("Scene Trigger", true);
        CameraShaker.Instance.ShakeOnce(0.5f, 10f, 1.8f, 0.1f);
        cameraFollow.CameraTrigger(new Vector3(0f, 15f, -50f), 6, 2f);

        yield return(new WaitForSeconds(1f));

        CameraShaker.Instance.ShakeOnce(3f, 2f, 0.1f, 3f);
        cameraFollow.CameraTrigger(new Vector3(0f, 15f, -50f), 12, 0.2f);
        animator.SetBool("Item", false);

        yield return(new WaitForSeconds(1f));

        cameraFollow.CameraTrigger(new Vector3(0f, 15f, -50f), 10, 1f);

        yield return(new WaitForSeconds(1f));

        cameraFollow.CameraTrigger(new Vector3(0f, 15f, -50f), 10, 0.5f); //back to default
        playerController.enabled = true;
        currentObject            = null;
        submitting = false;
    }
Exemple #2
0
 void OnTriggerEnter2D(Collider2D collider2D)
 {
     if (collider2D.CompareTag("Opi"))
     {
         cameraFollow.angleNumber = 1;
         cameraFollow.CameraTrigger(angle, zoom, speed);
     }
 }