public Scr_QuestEvent AddQuestEvent(string n_name, string d_description)
    {
        Scr_QuestEvent questEvent = new Scr_QuestEvent(n_name, d_description);

        questEvents.Add(questEvent);
        return(questEvent);
    }
    public void AddPath(string fromQuestEvent, string toQuestEvent)
    {
        Scr_QuestEvent from = FindQuestEvent(fromQuestEvent);
        Scr_QuestEvent to   = FindQuestEvent(toQuestEvent);

        if (from != null && to != null)
        {
            Scr_QuestPath p = new Scr_QuestPath(from, to);
            from.pathList.Add(p);
        }
    }
    public void BFS(string id, int orderNumber = 1)
    {
        Scr_QuestEvent thisEvent = FindQuestEvent(id);

        thisEvent.order = orderNumber;

        foreach (Scr_QuestPath e in thisEvent.pathList)
        {
            if (e.endEvent.order == -1)
            {
                BFS(e.endEvent.GetId(), orderNumber + 1);
            }
        }
    }
예제 #4
0
 public Scr_QuestPath(Scr_QuestEvent from, Scr_QuestEvent to)
 {
     startEvent = from;
     endEvent   = to;
 }