Exemple #1
0
    // -----------------------------------------------------------------------------------
    // Begin a Dialog with the player
    // This is called from a external source to start a dialog happening
    public bool BeginDialog(System.Int64 entryPoint)
    {
        scene = null;
        if (dialogActive)
        {
            return(false);              // We don't want to start a new dialog while one is active.
        }
        if (log)
        {
            UnityEngine.Debug.Log("Begin Dialog " + entryPoint + " fake scene");
        }
        story.GenerateRandom();
        currentRootNodeID = (int)entryPoint;
        DialogNode node = new DialogNode(entryPoint, db);

        if (log)
        {
            UnityEngine.Debug.Log("Node Valid " + node.isValid);
        }
        if (node.isValid)
        {
            if (miniMap)
            {
                miniMap.SetActive(false);
            }
            player.BeginDialog();
            dialogActive = true;
            dialogPanel.SetActive(true);
            DisplayDialog(node);
        }
        return(true);
    }