예제 #1
0
 protected void OnDeselectCharacterQuest(UICharacterQuest ui)
 {
     if (uiQuestDialog != null)
     {
         uiQuestDialog.Hide();
     }
 }
예제 #2
0
        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();
                }
            });
        }
예제 #3
0
 protected void OnSelectCharacterQuest(UICharacterQuest ui)
 {
     if (uiQuestDialog != null)
     {
         uiQuestDialog.selectionManager = SelectionManager;
         uiQuestDialog.Setup(ui.Data, character, ui.indexOfData);
         uiQuestDialog.Show();
     }
 }
예제 #4
0
 protected void OnDeselectCharacterQuest(UICharacterQuest ui)
 {
     if (uiQuestDialog != null)
     {
         uiQuestDialog.onHide.RemoveListener(OnQuestDialogHide);
         uiQuestDialog.Hide();
         uiQuestDialog.onHide.AddListener(OnQuestDialogHide);
     }
 }