Ejemplo n.º 1
0
    void CreateSpeech()
    {
        countSpeech -= 1;
        countDamage  = Random.Range(2, 6);
        DialogueScript objectDialog = (Instantiate(objectSpeech, Information.Instance.position, Quaternion.Euler(0, 0, 0))).GetComponent <DialogueScript>();

        if (countSpeech > 0)
        {
            objectDialog.SetDialogue(listObjectSpeech[Random.Range(0, listObjectSpeech.Count)]);
        }
        else
        {
            isCreatedWarritor = true;
            objectDialog.SetDialogue(listLastSpeech[Random.Range(0, listLastSpeech.Count)]);
            Instantiate(warrior, tr.position, Quaternion.Euler(0, 0, 0));
        }
    }