private void Redraw() { foreach (Transform child in this.transform) { Destroy(child.gameObject); } if (activeQuestTab) { activeButton.interactable = false; completedButton.interactable = true; foreach (QuestStatus status in questList.GetStatuses()) { if (!status.IsComplete()) { QuestItemUI uiInstance = Instantiate <QuestItemUI>(questPrefab, this.transform); uiInstance.Setup(status); } } } else { activeButton.interactable = true; completedButton.interactable = false; foreach (QuestStatus status in questList.GetStatuses()) { if (status.IsComplete()) { QuestItemUI uiInstance = Instantiate <QuestItemUI>(questPrefab, this.transform); uiInstance.Setup(status); } } } }
private void UpdateQuests() { foreach (QuestStatus status in _questList.QuestStatuses) { QuestItemUI questItemInstance = Instantiate(_questPrefab, _questContainer); questItemInstance.Setup(status); } }
private void Redraw() { foreach (Transform child in transform) { Destroy(child.gameObject); } foreach (QuestStatus status in questList.GetStatuses()) { QuestItemUI questItemUi = Instantiate <QuestItemUI>(questPrefab, transform); questItemUi.Setup(status); } }
private void UpdateUI() { foreach (Transform child in transform) { Destroy(child.gameObject); } foreach (QuestStatus status in questList.Statuses()) { QuestItemUI uiInstance = Instantiate(questPrefab, transform); uiInstance.Setup(status); } }