private void OnPinToggleValueChanged(bool isOn) { if (quest == null) { return; } if (!quest.canBePinned) { pinnedQuests.Remove(quest.id); pinQuestToggle.SetIsOnWithoutNotify(false); return; } if (isOn) { if (!pinnedQuests.Contains(quest.id)) { pinnedQuests.Add(quest.id); } } else { pinnedQuests.Remove(quest.id); } QuestsUIAnalytics.SendQuestPinChanged(quest.id, isOn, QuestsUIAnalytics.UIContext.QuestsLog); }
private void OnPinToggleValueChanged(bool isOn) { if (quest == null) { return; } if (!quest.canBePinned) { pinnedQuests.Remove(quest.id); SetPinStatus(false); return; } if (isOn) { if (!pinnedQuests.Contains(quest.id)) { pinnedQuests.Add(quest.id); } } else { pinnedQuests.Remove(quest.id); } QuestsUIAnalytics.SendQuestPinChanged(quest.id, isOn, QuestsUIAnalytics.UIContext.QuestsTracker); }
public void Awake() { questPopup.gameObject.SetActive(false); noQuestsTitle.SetActive(false); closeButton.onClick.AddListener(() => { QuestsUIAnalytics.SendQuestLogVisibiltyChanged(false, "quest_log_close_button"); DataStore.i.HUDs.questsPanelVisible.Set(false); }); }
public void Populate(QuestModel quest, QuestTask task) { payload = JsonUtility.FromJson <TaskPayload_Numeric>(task.payload); jumpInButton.gameObject.SetActive(task.progress < 1 && !string.IsNullOrEmpty(task.coordinates)); jumpInDelegate = () => { QuestsUIAnalytics.SendJumpInPressed(quest.id, task.id, task.coordinates, QuestsUIAnalytics.UIContext.QuestsLog); WebInterface.SendChatMessage(new ChatMessage { messageType = ChatMessage.Type.NONE, recipient = string.Empty, body = $"/goto {task.coordinates}", }); }; taskName.text = task.name; progressText.text = $"{payload.current}/{payload.end}"; status.isOn = task.progress >= 1; ongoingProgress.transform.localScale = new Vector3(task.progress, 1, 1); ongoingProgress.color = task.progress < 1 ? ongoinColor : completedcolor; }
private void OnPinToggleValueChanged(bool isOn) { if (quest == null) { return; } if (isOn) { if (!pinnedQuests.Contains(quest.id)) { pinnedQuests.Add(quest.id); } } else { if (pinnedQuests.Contains(quest.id)) { pinnedQuests.Remove(quest.id); } } QuestsUIAnalytics.SendQuestPinChanged(quest.id, isOn, QuestsUIAnalytics.UIContext.QuestDetails); }
public void Populate(QuestModel newQuest) { quest = newQuest; QuestTask incompletedTask = quest.sections.FirstOrDefault(x => x.progress < 1)?.tasks.FirstOrDefault(x => x.progress < 1); jumpInButton.gameObject.SetActive(incompletedTask != null && !string.IsNullOrEmpty(incompletedTask?.coordinates)); jumpInDelegate = () => { if (incompletedTask == null) { return; } QuestsUIAnalytics.SendJumpInPressed(quest.id, incompletedTask.id, incompletedTask.coordinates, QuestsUIAnalytics.UIContext.QuestsLog); WebInterface.SendChatMessage(new ChatMessage { messageType = ChatMessage.Type.NONE, recipient = string.Empty, body = $"/goto {incompletedTask.coordinates}", }); }; readMoreDelegate = () => OnReadMoreClicked?.Invoke(quest.id); questName.text = quest.name; description.text = quest.description; SetThumbnail(quest.thumbnail_entry); pinQuestToggle.SetIsOnWithoutNotify(pinnedQuests.Contains(quest.id)); pinQuestToggle.gameObject.SetActive(!quest.isCompleted); progressInTitle.transform.localScale = new Vector3(quest.progress, 1, 1); completedProgressInTitle.gameObject.SetActive(quest.isCompleted); completedMarkInTitle.gameObject.SetActive(quest.isCompleted); SetRewards(quest.rewards?.Length ?? 0); }
private void OnToggleActionTriggered(DCLAction_Trigger action) { bool value = !DataStore.i.HUDs.questsPanelVisible.Get(); QuestsUIAnalytics.SendQuestLogVisibiltyChanged(value, "input_action"); SetVisibility(value); }