public void StartSequence(AbilityToInteract abilityToInteract)
 {
     if (!dialogDone)
     {
         StartCoroutine(SpawnTexts(abilityToInteract));
     }
 }
Exemple #2
0
    public void PickingUp(AbilityToInteract actor)
    {
        PlayerStats ps = actor.GetComponent <PlayerStats>();

        if (ps != null)
        {
            Debug.Log("New Sign added to Astral Map!");
            pickupCollider.enabled = false;
            ps.AddRaceToMap(raceToPickUp);
        }
    }
Exemple #3
0
    public void StartSequence() //para cutscenes onde o jogador não interage manualmente
    {
        if (dialogBegan)
        {
            return;
        }
        if ((!repeatOnCall && dialogDone))
        {
            return;
        }

        dialogBegan        = true;
        currentDialogIndex = 0;
        actor = null;
        ProgressDialog();
    }
Exemple #4
0
    private float offsetTimer = 0.6f; //para dar tempo do texto subir, precisa ser private pq não quero que seja alterado

    public void StartSequence(AbilityToInteract abilityToInteract)
    {
        if (dialogBegan)
        {
            return;
        }
        if ((!repeatOnCall && dialogDone))
        {
            return;
        }

        dialogBegan        = true;
        currentDialogIndex = 0;
        actor = abilityToInteract;
        ProgressDialog();
    }
    IEnumerator SpawnTexts(AbilityToInteract actor)
    {
        BubbleDialogSequence.LineInfo[] texts = null;
        if (actor)
        {
            texts = raceDialogAsset.GetRaceLines(actor.actorEntity.baseRace);
        }
        else if (defaultActor)
        {
            texts = raceDialogAsset.GetRaceLines(defaultActor.baseRace);
        }

        for (int i = 0; i < texts.Length; i++)
        {
            if (texts[i].isFromActor && actor != null)
            {
                SpawnBubbleOn(texts[i].bubbleText, actor.transform, texts[i].timeToReadLine, texts[i].bubbleTitle);
            }
            else
            {
                if (conversationMembers != null && conversationMembers.Length > texts[i].targetMemberIndex &&
                    texts[i].targetMemberIndex >= 0 && conversationMembers[texts[i].targetMemberIndex])
                {
                    SpawnBubbleOn(texts[i].bubbleText, conversationMembers[texts[i].targetMemberIndex], texts[i].timeToReadLine, texts[i].bubbleTitle);
                }
                else
                {
                    SpawnBubbleOn(texts[i].bubbleText, transform, texts[i].timeToReadLine, texts[i].bubbleTitle);
                }
            }

            yield return(new WaitForSeconds(texts[i].timeToReadLine + 0.5f)); //offset pro prox text aparecer
        }
        OnDialogEnd?.Invoke();
        //if(actor)
        dialogDone = true;
    }
 // Start is called before the first frame update
 void Start()
 {
     abilityToInteract = this.GetComponent <AbilityToInteract>();
 }