public void ShowAsNew( Nekoyume.Model.Quest.Quest quest, System.Action <GuidedQuestCell> onComplete = null, bool ignoreAnimation = false) { if (quest is null) { onComplete?.Invoke(this); return; } SetToInProgress(false); Quest = quest; SetContent(Quest); if (ignoreAnimation) { SetRewards(quest.Reward.ItemMap, true); onComplete?.Invoke(this); } else { ClearRewards(); showingAndHidingTweener .PlayTween() .OnPlay(() => gameObject.SetActive(true)) .OnComplete(() => { SetRewards(quest.Reward.ItemMap); onComplete?.Invoke(this); }); } }
public void Set(QuestModel quest) { data = quest; Sprite sprite; var text = quest.GetContent(); var color = ColorHelper.HexToColorRGB("fff9dd"); if (quest.Complete) { sprite = Resources.Load <Sprite>("UI/Textures/UI_icon_quest_02"); color = ColorHelper.HexToColorRGB("7a7a7a"); } else { sprite = Resources.Load <Sprite>("UI/Textures/UI_icon_quest_01"); } icon.sprite = sprite; icon.SetNativeSize(); label.text = text; label.color = color; }
private void PostHideAsClear(System.Action <GuidedQuestCell> onComplete) { Quest = null; gameObject.SetActive(false); onComplete?.Invoke(this); }
private void SetContent(Nekoyume.Model.Quest.Quest quest) { contentText.text = effectedContentText.text = quest.GetContent(); }
public void Show(Nekoyume.Model.Quest.Quest quest) { ShowAsNew(quest, null, true); }