예제 #1
0
 public void DisplayFightMenu()
 {
     //talkMenuObject.SetActive (false);
     //abilityMenuObject.SetActive (false);
     fightMenuObject.SetActive(true);
     foreach (Transform t in talkMenuButtonsObject.transform)
     {
         Destroy(t.gameObject);
     }
     //textObject.text = "";
     textDisplayObject.ClearText();
 }
예제 #2
0
    private void ContinueStory()
    {
        // Clear UI
        storyTextDisplay.ClearText();
        storyChoiceButtons.ClearChoices();

        currentTags.Clear();

        // Ensure that there is text to get
        if (inkStory.canContinue)
        {
            // Get the next line
            string nextLine = "";

            if (shouldContinueMaximally)
            {
                while (inkStory.canContinue)
                {
                    nextLine += inkStory.Continue();
                    currentTags.AddRange(inkStory.currentTags);
                }
            }
            else
            {
                nextLine = inkStory.Continue();
                currentTags.AddRange(inkStory.currentTags);
            }

            // Display text
            storyTextDisplay.DisplayText(nextLine);

            // Handle Tags
            InvokeTags();
        }
        else if (inkStory.currentChoices.Count > 0)
        {
            storyChoiceButtons.DisplayChoices(inkStory.currentChoices, this);
        }
        else
        {
            Debug.LogError("The story is over! It can't continue!");
        }
    }
예제 #3
0
    public IEnumerator SelectTalkCoroutine()
    {
        List <ReplyData> replies = new List <ReplyData> (enemy.data.conversations [talkTier].replies);

        replies.Shuffle();

        //talkMenuText.text = "";
        talkMenuTextDisplay.ClearText();
        talkMenuObject.SetActive(true);

        yield return(StartCoroutine(talkMenuTextDisplay.DisplayTextCoroutine(enemy.data.conversations [talkTier].prompt, enemy.color)));


        foreach (ReplyData reply in replies)
        {
            GameObject go = Instantiate(buttonPrefab);
            go.transform.SetParent(talkMenuButtonsObject.transform);
            ButtonController bc = go.GetComponent <ButtonController> ();
            bc.InitButton(reply.text, reply, this);
        }
    }