Exemplo n.º 1
0
    public void AddRandomQuest(QuestType type)
    {
        int targetIdx = UnityEngine.Random.Range(0, (int)ImplementedQuests.Count);

        Quest_Base randomQuest = null;

        switch (targetIdx)
        {
        case (int)ImplementedQuests.Quest_Hunt:
            randomQuest = new Quest_Hunt();
            break;

        case (int)ImplementedQuests.Quest_MoveToGoal:
            randomQuest = new Quest_MoveToGoal();
            break;

        default:
            break;
        }

        if (randomQuest == null)
        {
            return;
        }

        randomQuest.Random(type);
    }
Exemplo n.º 2
0
    public void ChangeAllQuestText(QuestType type, Quest_Base quest)
    {
        int startIdx = (int)type * m_gapBetweenQuests;

        Get <Text>(startIdx).text = quest.Context;
        Get <Text>(startIdx + m_extraPointAtProgress).text = quest.ProgressText;
        Get <Text>(startIdx + m_extraPointAtReward).text   = quest.RewardText;
    }
Exemplo n.º 3
0
    public void AddQuest(QuestType type, Quest_Base quest)
    {
        if (m_questScene == null)
        {
            return;
        }

        if (m_questList.ContainsKey(type))
        {
            Debug.Log($"퀘스트가 이미 있습니다.");
            return;
        }

        m_questList.Add(type, quest);
        m_questScene.ChangeAllQuestText(type, quest);
    }