示例#1
0
    private void OnItemIDChanged(ItemID id)
    {
        // Set the title text to the name of the category
        ItemData data = ItemRegistry.Get(id);

        titleText.text = data.Name.Get(ItemName.Type.Science) + ": Target Specifications";

        // Destroy all notes
        foreach (ResearchSingleNoteUI note in currentNotes)
        {
            Destroy(note.gameObject);
        }
        currentNotes.Clear();

        // Create a new note for every label
        foreach (string label in CurrentNoteLabels.Labels)
        {
            ResearchSingleNoteUI clone = Instantiate(notePrefab, noteParent.transform);
            clone.Setup(id, label, scrollView);
            currentNotes.Add(clone);
        }
    }
 // Add a note
 public void Add(ResearchSingleNoteUI ui)
 {
     notes.Add(ui);
 }