private void AddQuestPanel(Quest Quest) { QuestDisplayPanel newPanel = GameObject.Instantiate <QuestDisplayPanel>(m_QuestPanelPrefab, m_Content); newPanel.QuestDisplayPanelSelectEvent += OnQuestDisplayPanelSelect; newPanel.Initialize(Quest); m_QuestPanels.Add(newPanel); }
//Events private void OnQuestDisplayPanelSelect(QuestDisplayPanel questDisplayPanel) { if (m_SelectedPanel != null) { m_SelectedPanel.Deselect(); } m_SelectedPanel = questDisplayPanel; m_PictureAlbumGridPanel.AddFilter(questDisplayPanel.Quest.StartTime, questDisplayPanel.Quest.EndTime); }