예제 #1
0
 void NavigateFromStart(AuroraDLG.AStarting start)
 {
     Debug.Log("Navigating from start");
     // Find the entry this start points to
     curEntry = GetEntry((int)start.Index);
     mode     = DialogState.CHOOSING_REPLY;
 }
예제 #2
0
    void StartDialog(AuroraDLG dlg, AuroraObject owner)
    {
        // TODO: Find the appropriate starting point by running
        // the relevant NCS scripts
        dialogue = dlg;

        if (owner.GetType() == typeof(Creature))
        {
            ((Creature)owner).OnDialogue();
        }

        AuroraDLG.AStarting starter = null;
        foreach (AuroraDLG.AStarting option in dlg.StartingList)
        {
            string scriptName = option.Active;
            if (scriptName == "")
            {
                starter = option;
                break;
            }
            if (stateManager.RunConditionalScript(scriptName, owner) > 0)
            {
                starter = option;
                break;
            }
        }

        if (starter == null)
        {
            // Could not find a starter
            throw new System.Exception("Failed to find a successful starting option for dialog");
        }

        AuroraDLG.AEntry startEntry = dlg.EntryList[(int)starter.Index];

        Debug.Log("Start entry: " + startEntry);

        curEntry = startEntry;

        if (curEntry.Script != "")
        {
            stateManager.RunScript(curEntry.Script, owner);
        }

        curMode = DialogMode.NPC;

        this.owner = owner;
    }
예제 #3
0
 void SelectedStart(AuroraDLG.AStarting start)
 {
     curEditingLink = start;
     curEditing     = GetEntry((int)start.Index);
 }
예제 #4
0
 public StartNode()
 {
     start = new AuroraDLG.AStarting();
 }