private void SetText(RotationsSave rs) { if (rs.GetFirst()) { rs.SetFirst(false); StartCoroutine(MonologueAndWaitAdvance(FindObjectOfType <MonologueVisualizer>().VisualizeTextNonTutorial(rs.GetText(_currentLanguage)))); } }
/// <summary> /// Rotate the object to the rotation at the current index. /// </summary> private void RotateObject() { Debug.Log("index: " + _currentIndex); RotationsSave currentSave = rotations[_currentIndex]; transform.LeanRotateX((currentSave.GetPosX() + (int)_originalRotation.eulerAngles.x), 0.3f).setDirection(1); transform.LeanRotateY((currentSave.GetPosY() + (int)_originalRotation.eulerAngles.y), 0.3f).setDirection(1); SetText(currentSave); PlayAudio(currentSave); }
/// <summary> /// Plays the audio associated with the current Rotation /// </summary> /// <param name="rs"></param> private void PlayAudio(RotationsSave rs) { if (rs.GetAudio() != null) { if (!FindObjectOfType <TutorialManager>()._doTutorial) { if (rs.GetFirst()) { rs.SetFirst(false); Debug.Log("Should play audio here"); } } } }