private void OnNewStoryAdded(StorySO story) { foreach (var filler in m_CategoryItems) { // add it to the main list as well. if (filler.Category == StoryType.All || filler.Category == story.TypeId) { filler.Add(story); return; } } // this means we don't have the category, add it to the list Create(new KeyValuePair <StoryType, List <StorySO> >(story.TypeId, new List <StorySO> { story })); }
public void Add(StorySO story) { InteractionStoryFiller row = Instantiate(storyRowPrefab, Vector3.zero, Quaternion.identity); row.categoryManager = this; selectedRow = row; var trans = row.transform; trans.SetParent(transform); trans.localScale = Vector3.one; // fill the in the item in the story log. row.Set(story); row.FillInteractionPanel(); m_RowItems.Add(row); }
public void Set(StorySO story) => m_Story = story;