Пример #1
0
    private void PlayReplic(DialoguePhrase dialoguePhrase)
    {
        LeftPerson.SetActive(dialoguePhrase.Side == DialoguePhrase.PortraitSide.Left);
        RightPerson.SetActive(dialoguePhrase.Side == DialoguePhrase.PortraitSide.Right);

        switch (dialoguePhrase.Side)
        {
        case DialoguePhrase.PortraitSide.Left:
            LeftPortrait.gameObject.SetActive(dialoguePhrase.Char != null);
            LeftName.gameObject.transform.parent.gameObject.SetActive(dialoguePhrase.Char != null);
            if (dialoguePhrase.Char)
            {
                LeftPortrait.sprite = dialoguePhrase.Char.Portrait;
                LeftName.text       = dialoguePhrase.Char.CharacterName.Text;
            }
            break;

        case DialoguePhrase.PortraitSide.Right:
            RightPortrait.gameObject.SetActive(dialoguePhrase.Char != null);
            RightName.gameObject.transform.parent.gameObject.SetActive(dialoguePhrase.Char != null);
            if (dialoguePhrase.Char)
            {
                RightPortrait.sprite = dialoguePhrase.Char.Portrait;
                RightName.text       = dialoguePhrase.Char.CharacterName.Text;
            }
            break;
        }

        // Typewriter.initialText = dialoguePhrase.Text.Text;
        Typewriter.Write(dialoguePhrase.Text.Text, new string[] { });
        // Typewriter.Write();
    }
Пример #2
0
 private void HideDialogue()
 {
     Playing        = false;
     _phraseId      = 0;
     _playingDialog = null;
     TextPanel.gameObject.SetActive(false);
     LeftPerson.SetActive(false);
     RightPerson.SetActive(false);
 }
 public async Task AddRightPersonAsync(RightPerson person)
 {
     await _context.RightPeople.AddAsync(person);
 }