// TODO: disable player movement/enable in CloseScroll public void OpenScroll(TextObject textObj, GameObject textContainer) { if (openedScrollText != null) { Debug.LogWarning("Tried opening scroll while scroll is already open! Tried opening: " + textObj.name); return; } openedScrollText = textObj; openedScrollText.gameObject.SetActive(true); scrollDisplayPanel.SetActive(true); openedScrollTextContainer = textContainer; openedScrollTextContainer.SetActive(true); scrollAnimator.SetBool("isOpen", true); // requires panel to be active :) // animation stuff or delay here openedScrollText.StartTyping(); }
private IEnumerator EnableScrollAfterDelay(float seconds) { yield return(new WaitForSeconds(seconds)); openedScrollText.StartTyping(); }