Esempio n. 1
0
 static public bool QuestNormaCleared(string questName)  //指定したQuestのノルマが達成できてるかどうか
 {
     if (!OrderedQuest.ContainsKey(questName))
     {
         Debug.LogError(questName + "が受注済みクエスト内に見つかりません");
         return(false);
     }
     return(OrderedQuest[questName].AllNormaCleared());
 }
Esempio n. 2
0
    static public void QuestClear(string questName)
    {
        if (OrderedQuest.ContainsKey(questName))
        {
            OrderedQuest[questName].WhenQuestCleared?.Invoke();
            var quest = OrderedQuest[questName];

            OrderedQuest.Remove(questName);
            ClearedQuest.Add(questName, quest);

            GameObject.Destroy(quest);
            QuestHeaderGenerator.EnCleared(quest.info.displayName);
        }
        else
        {
            Debug.LogError("受注済みクエストに" + questName + "がない状態でQuestClearが呼ばれました");
            return;
        }
    }
Esempio n. 3
0
    static public void QuestAccept(string questName)
    {
        if (!database.AcceptableQuest.ContainsKey(questName))
        {
            Debug.LogError(questName + "が受注可能クエスト内に見つかりません");
            return;
        }
        Quest_Behaviour quest = database.AcceptableQuest[questName];

        database.AcceptableQuest.Remove(questName);
        //quest.WhenQuestAccepted?.Invoke();
        var obj = GameObject.Instantiate(quest);

        obj.name = questName;//名前から(Clone)を除く
        OrderedQuest.Add(questName, obj);
        QuestHeaderGenerator.Generate(database.questHeaderPrefab, quest.info.displayName);
        QuestDetailGenerator.Generate(database.questDetailPrefab, quest.info);
        questTab.LinkTabHeader();
    }