private void AddPictureDisplay(Picture picture) { PictureDisplayPanel newPanel = GameObject.Instantiate <PictureDisplayPanel>(m_PictureDisplayPanelPrefab, m_Content); newPanel.PictureDisplaySelectedEvent += OnPictureDisplaySelect; newPanel.PictureDisplayRemoveEvent += OnPictureDisplayRemove; newPanel.Initialize(picture, m_QuestManager); m_PictureDisplayPanels.Add(newPanel); }
//Picture Display Panel Events private void OnPictureDisplaySelect(PictureDisplayPanel pictureDisplayPanel) { if (m_SelectedPanel != null) { m_SelectedPanel.Deselect(); } m_SelectedPanel = pictureDisplayPanel; //Pass trough if (PictureSelectEvent != null) { PictureSelectEvent(pictureDisplayPanel.Picture); } }