Пример #1
0
    //-------------------------------Dialogue------------------------------------------------

    private void StartGhostDialogue(int talkTarget)
    {
        player.PlayZoomInAnimation(ghostTarget[talkTarget].GetPosition());
        currentMultiChoice = 0;
        dialogueBox.ActivateDialogue();
        GhostBase ghost        = ghostTarget[talkTarget].Ghost.Base;
        int       dialogueSize = ghost.getGhostDialogue().Count;

        int randomIndex = UnityEngine.Random.Range(0, dialogueSize);

        dialogueBase = ghostTarget[talkTarget].Ghost.Base.getGhostDialogue()[randomIndex];

        if (dialogueBase.ghostLines[dialogueIndex].multiChoices.Length > 0)
        {
            //TODO: Show choice
            state = BattleState.MultiChoice;
            StartCoroutine(TypeDialogue(BattleState.MultiChoice, dialogueBase.ghostLines[dialogueIndex].text));
            playerHud.OpenMulti();
            playerHud.UpdateChoice(dialogueBase.ghostLines[dialogueIndex].multiChoices);
        }
        else
        {
            StartCoroutine(TypeDialogue(BattleState.GhostDialogue, dialogueBase.ghostLines[dialogueIndex].text));
        }
    }