Exemple #1
0
    private void SetUpDialogue()
    {
        leftPersonImage.sprite  = dialogue.GetLeftSprite();
        rightPersonImage.sprite = dialogue.GetRightSprite();

        DialogueInitiator initiator = dialogue.GetInitiator();

        dialogueText = initiator == DialogueInitiator.Right ? leftPersonText : rightPersonText;//especially wrong behaviour to change it further

        HeroTypeName leftPerson = dialogue.GetLeftName();

        InitializePersonName(leftPerson, leftNameText);
        HeroTypeName rightPerson = dialogue.GetRightName();

        InitializePersonName(rightPerson, rightNameText);
    }
Exemple #2
0
    private void InitializePersonName(HeroTypeName heroName, TextMeshProUGUI nameText)
    {
        switch (heroName)
        {
        case HeroTypeName.Player:
            nameText.text = GameManager.instance.GetPlayerName();
            break;

        case HeroTypeName.PlayerFriend:
            nameText.text = "Friend";    //get name from settings
            break;

        case HeroTypeName.Father:
            nameText.text = "Father";    //get name from settings
            break;

        case HeroTypeName.Mother:
            nameText.text = "Mother";    //get name from settings
            break;
        }
    }