예제 #1
0
    public void Init(TalkableCharacter _char, NarrativeDialog dialog)
    {
        character = _char;
        type      = dialog.type;

        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.transform.localScale = Vector3.one * 0.01f;
            m_backImage.transform.DOScale(1f, showUpTime);
            m_backImage.DOFade(backImageOriginalAlpha, showUpTime);
        }
        if (m_arrow != null)
        {
            m_arrow.DOFade(backImageOriginalAlpha, showUpTime);
        }

        UpdateDialogFramePosition();
    }
예제 #2
0
 Color GetDialogColorFromType(NarrativeDialog.SpeakerType type)
 {
     if (type == NarrativeDialog.SpeakerType.MainCharacter)
     {
         return(mainDialogColor);
     }
     else if (type == NarrativeDialog.SpeakerType.Girl)
     {
         return(girlDialogColor);
     }
     else
     {
         return(otherDialogColor);
     }
 }