protected void OnDeselectCharacterQuest(UICharacterQuest ui) { if (uiQuestDialog != null) { uiQuestDialog.Hide(); } }
public void UpdateData(IPlayerCharacterData character) { this.character = character; int selectedQuestId = CacheQuestSelectionManager.SelectedUI != null ? CacheQuestSelectionManager.SelectedUI.Data.dataId : 0; CacheQuestSelectionManager.DeselectSelectedUI(); CacheQuestSelectionManager.Clear(); List <CharacterQuest> characterQuests = new List <CharacterQuest>(); foreach (CharacterQuest characterQuest in character.Quests) { if (HideCompleteQuest || characterQuest.isComplete) { continue; } characterQuests.Add(characterQuest); } CacheQuestList.Generate(characterQuests, (index, characterQuest, ui) => { UICharacterQuest uiCharacterQuest = ui.GetComponent <UICharacterQuest>(); uiCharacterQuest.Setup(characterQuest, character, index); uiCharacterQuest.Show(); CacheQuestSelectionManager.Add(uiCharacterQuest); if (selectedQuestId == characterQuest.dataId) { uiCharacterQuest.OnClickSelect(); } }); }
protected void OnSelectCharacterQuest(UICharacterQuest ui) { if (uiQuestDialog != null) { uiQuestDialog.selectionManager = SelectionManager; uiQuestDialog.Setup(ui.Data, character, ui.indexOfData); uiQuestDialog.Show(); } }
protected void OnDeselectCharacterQuest(UICharacterQuest ui) { if (uiQuestDialog != null) { uiQuestDialog.onHide.RemoveListener(OnQuestDialogHide); uiQuestDialog.Hide(); uiQuestDialog.onHide.AddListener(OnQuestDialogHide); } }