示例#1
0
 void Start()
 {
     if (reEntryNode != null)
     {
         Debug.Log("SETTING VIA REENTRY");
         currentNode = GameObject.Find(reEntryNode).GetComponent <StoryNode>();
     }
     if (currentNode != null)
     {
         currentNode.Activate();
     }
     else
     {
         Debug.LogError("Starting story node cannot be unassigned");
     }
 }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        visibleWinFlag = Gamemanager.WonBattleFlag;
        rNodeVis       = reEntryNode;
        if (currentNode == null && !isPaused)
        {
            return;
        }
        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            currentNode.SelectOption(1);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            currentNode.SelectOption(2);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha3))
        {
            currentNode.SelectOption(3);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha4))
        {
            currentNode.SelectOption(4);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha5))
        {
            currentNode.SelectOption(5);
        }
        else if (Input.GetKeyDown(KeyCode.Return))
        {
            currentNode.MoveNext();
        }

        if (currentNode.next != null)
        {
            currentNode = currentNode.next;
            currentNode.Activate();
        }
    }