private void Update() { if (dialogueManager.curr.Contains(note1[0])) { i = 0; animator.SetFloat("Animation", i); player.StopMovement(); player.enabled = false; camr.isRotatable = false; } if (i >= 0 && i < note1.Length) { if (dialogueManager.curr.Contains(note1[i])) { i++; animator.SetFloat("Animation", i); } } else if (i >= note1.Length && Input.GetButtonDown("Jump")) { animator.SetFloat("Animation", -1); camr.isRotatable = true; player.enabled = true; if (invisWallDeactivate.gameObject.activeInHierarchy) { invisWallDeactivate.toggleBarrier(); } } }
private void Update() { if (dialogueManager.curr.Contains(note1[0])) { i = 0; animator.SetFloat("Animation2", i); player.StopMovement(); player.enabled = false; camr.isRotatable = false; } if (i >= 0 && i < note1.Length) { if (dialogueManager.curr.Contains(note1[i])) { i++; animator.SetFloat("Animation2", i); Debug.Log("Note progress: " + i + " / " + note1.Length); } } else if (i >= note1.Length && Input.GetButtonDown("Jump")) { Debug.Log("End of note"); animator.SetFloat("Animation2", -1); camr.isRotatable = true; player.enabled = true; } }