public void showNotes(IEnumerable <Note> notes) { NotesContainer.childrenDestroyAll(); foreach (Note note in notes) { UINote uiNote = Instantiate(NotePrefab, NotesContainer); uiNote.setNote(note); } gameObject.SetActive(true); }
//////////////// private static void DisplayNote(string titleText, string[] pages) { UINote elem = FreeHUD.GetElement("ReadableBook") as UINote; if (elem == null) { elem = new UINote(titleText, pages); elem.Initialize(); FreeHUD.AddElement("ReadableBook", elem); } else { elem.SetTitle(titleText); elem.SetPages(pages); } LayerDisable.Instance.DisabledLayers.Add(LayerDisable.InfoAccessoriesBar); }