private void RemoveTheme(ThemePlan theme) { _themes[theme].Close(); _themes.Remove(theme); if (_themes.Count <= 0) { _onThemesEnded.Invoke(_plan); } }
public void Show(ThemePlan plan, Action <QuestionPlan> onQuestionSelected, Action <ThemePlan> onQuestionsEnded) { _plan = plan; _themeNameLabel.text = _plan.ThemeName; _onQuestionsEnded = onQuestionsEnded; foreach (var question in _plan.QuestionsList) { var questionPanel = Instantiate(_questionPanel, _questionContainer); questionPanel.Show(question, arg => { onQuestionSelected(arg); RemoveQuestion(arg); }); _questions.Add(question, questionPanel); } ShowGameObject(); }