private void StartNewText(StaticTextHolder text) { _titleText.text = text.Label; if (text.Text.Length <= _maxPageCharCount) { _bodyText.text = text.Text; _prevButton.gameObject.SetActive(false); _nextButton.gameObject.SetActive(false); } else { _activePages.AddRange(SplitOnLength(text.Text, _maxPageCharCount)); LoadCurrentPage(); } _canvasGroup.SetActive(true); if (_openNoise) { AudioSource.PlayClipAtPoint(_openNoise, transform.position); } }
public static void ReadBook(StaticTextHolder text) { main.StartNewText(text); }