예제 #1
0
        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);
                });
            }
        }
예제 #2
0
        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;
        }
예제 #3
0
 private void PostHideAsClear(System.Action <GuidedQuestCell> onComplete)
 {
     Quest = null;
     gameObject.SetActive(false);
     onComplete?.Invoke(this);
 }
예제 #4
0
 private void SetContent(Nekoyume.Model.Quest.Quest quest)
 {
     contentText.text = effectedContentText.text = quest.GetContent();
 }
예제 #5
0
 public void Show(Nekoyume.Model.Quest.Quest quest)
 {
     ShowAsNew(quest, null, true);
 }