コード例 #1
0
ファイル: UIManager.cs プロジェクト: kris3254/S-Project
    void ChangeText()
    {
        textObjectActions objectDequeued = textsToShow.Dequeue();

        CancelInvoke("ChangeText");
        if (textsToShow.Count <= 0)
        {
            canEnter = true;
            pController.canDoThings = true;
            dialogPanel.SetActive(false);
            if (objectDequeued.script != null && objectDequeued.endMethod != null)
            {
                objectDequeued.script.SendMessage(objectDequeued.endMethod);
            }
        }
        else
        {
            objectDequeued  = textsToShow.Peek();
            canEnter        = !objectDequeued.isTuto;
            dialogText.text = objectDequeued.text;
            if (objectDequeued.script != null && objectDequeued.initMethod != null)
            {
                objectDequeued.script.SendMessage(objectDequeued.initMethod);
            }
            Invoke("ChangeText", timeBetweenDialogTexts);
        }
    }
コード例 #2
0
ファイル: UIManager.cs プロジェクト: kris3254/S-Project
    void AddNewDialog(textObjectActions objectIn)
    {
        canEnter = !objectIn.isTuto;
        dialogPanel.SetActive(true);
        dialogText.text = objectIn.text;

        Invoke("ChangeText", timeBetweenDialogTexts);
    }
コード例 #3
0
ファイル: UIManager.cs プロジェクト: kris3254/S-Project
    public void AddDialogText(string text, bool isTuto)
    {
        textObjectActions textObject = new textObjectActions(text, null, null, null, isTuto);

        textsToShow.Enqueue(textObject);
        if (!dialogPanel.activeSelf)
        {
            AddNewDialog(textObject);
        }
    }
コード例 #4
0
ファイル: UIManager.cs プロジェクト: kris3254/S-Project
    public void AddDialogText(string text, MonoBehaviour script, string initMethod, string endMethod, bool isTuto)
    {
        textObjectActions textObject = new textObjectActions(text, script, initMethod, endMethod, isTuto);

        textsToShow.Enqueue(textObject);
        if (!dialogPanel.activeSelf)
        {
            if (script != null && initMethod != null)
            {
                script.SendMessage(initMethod);
            }
            AddNewDialog(textObject);
        }
    }