Exemple #1
0
    void EndDisplayPlot(DisplayPlot plot)
    {
        LogicArg arg = new LogicArg(this);

        arg.AddMessage(M_Event.EVENT_END_DISPLAY_SENDER, plot.character);
        arg.AddMessage(M_Event.EVENT_END_DISPLAY_FRAME, true);
        M_Event.FireLogicEvent(LogicEvents.EndDisplayDialog, arg);

        if (plot.plot.endPlotEvent != LogicEvents.None)
        {
            M_Event.FireLogicEvent(plot.plot.endPlotEvent, arg);
        }
    }
Exemple #2
0
    void DisplayUnimportantDialog(NarrativeDialog dialog, DisplayPlot plot)
    {
        if (m_test_ShowDialog)
        {
            plot.otherSpeaker.clip = dialog.clip;
            plot.otherSpeaker.Play();


            GameObject smallDialog = Instantiate(smallDialogPrefab) as GameObject;
            smallDialog.transform.SetParent(UIManager.Instance.transform);
            Dialog dialogCom = smallDialog.GetComponent <Dialog> ();

            if (dialogCom != null)
            {
                dialogCom.Init(plot.character, dialog);
            }
        }
    }
Exemple #3
0
    void DisplayDialog(NarrativeDialog dialog, DisplayPlot plot)
    {
        if (m_text != null)
        {
            m_text.DOKill();
            m_text.text = dialog.word;
//			m_text.DOText( dialog.word , dialog.word.Length * 0.06f + 0.3f );
            m_text.DOFade(1f, showUpTime);
        }
        if (m_backImage != null)
        {
            m_backImage.DOKill();
            m_backImage.color = GetDialogColorFromType(dialog.type);
            m_backImage.transform.localScale = Vector3.one * 0.01f;
            m_backImage.transform.DOScale(1f, showUpTime);
            m_backImage.DOFade(backImageOriginalAlpha, showUpTime);
        }
        if (m_arrow != null)
        {
            m_arrow.DOKill();
            m_arrow.DOFade(backImageOriginalAlpha, showUpTime);
        }

        if (temSpeaker != null)
        {
            temSpeaker.Stop();
        }

        switch (dialog.type)
        {
        case NarrativeDialog.SpeakerType.ThisCharacter:
        case NarrativeDialog.SpeakerType.Girl:
            temSpeaker = plot.otherSpeaker;
            break;

        case NarrativeDialog.SpeakerType.MainCharacter:
            temSpeaker = mainCharacterSpeaker;
            break;

        default:
            break;
        }
        ;

        if (dialog.clip != null)
        {
            temSpeaker.clip = dialog.clip;
            temSpeaker.Play();
        }

        temDialog = dialog;

        UpdateDialogFramePosition();

        LogicArg arg = new LogicArg(this);

        arg.AddMessage("word", dialog.word);
        arg.AddMessage("character", dialog.type.ToString());
        arg.AddMessage("important", plot.plot.important);
        M_Event.FireLogicEvent(LogicEvents.DisplayNextDialog, arg);

        dialogTimer = 0;
    }
Exemple #4
0
        public void DisplayStateShouldBe(IAWG awg, DisplayPlot expectedValue)
        {
            string interpretedValue = (expectedValue == DisplayPlot.On) ? "1" : "0";

            Assert.AreEqual(interpretedValue, awg.DisplayPlotState);
        }
Exemple #5
0
        /// <summary>
        /// Sets the plot display state for an AWG
        /// </summary>
        /// <param name="awg"></param>
        /// <param name="setState"></param>
        public void SetPlotDisplayState(IAWG awg, DisplayPlot setState)
        {
            var state = (setState == DisplayPlot.On) ? "ON" : "OFF";

            awg.SetDisplayState(state);
        }